diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index 3aac9002..9e486bff 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -1,13 +1,45 @@ - - - - - - - - <%= yield %> - + + + + + + + + + + + + + + + <%= yield %> diff --git a/app/views/passwordless/mailer/sign_in.html.erb b/app/views/passwordless/mailer/sign_in.html.erb new file mode 100644 index 00000000..f5a11c5c --- /dev/null +++ b/app/views/passwordless/mailer/sign_in.html.erb @@ -0,0 +1,57 @@ + +
+
+ + + + +
+
+ + + + +
+ + StaffPlan + +
+

+ Hello there! +

+

+ Please use this token to complete your sign in to your StaffPlan account: +

+

+ <%= @token %> +

+

+ or sign in directly using the link below. +

+ +
+

+ Thanks, +
+ StaffPlan +

+
+ + + + +
+

+ © <%= Date.today.year %> StaffPlan. All rights reserved. +

+
+
+
+
+ diff --git a/app/views/passwordless/mailer/sign_in.text.erb b/app/views/passwordless/mailer/sign_in.text.erb index e5d78504..599bb6e9 100644 --- a/app/views/passwordless/mailer/sign_in.text.erb +++ b/app/views/passwordless/mailer/sign_in.text.erb @@ -1 +1,7 @@ -<%= t("passwordless.mailer.sign_in.body", token: @token, magic_link: @magic_link) %> +Use this token to complete your sign in: + +<%= @token %> + +Alternatively you can use this link to sign in directly: <%= @magic_link %> + +StaffPlan diff --git a/app/views/passwordless/sessions/show.html.erb b/app/views/passwordless/sessions/show.html.erb index 355e3ef5..bbebc55a 100644 --- a/app/views/passwordless/sessions/show.html.erb +++ b/app/views/passwordless/sessions/show.html.erb @@ -12,7 +12,10 @@
<%= f.label :token, "Please enter the token we've sent you via e-mail", autocomplete: "off", class: "block text-sm font-medium leading-6 text-gray-900" %>
- <%= f.text_field :token, class: "block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" %> + <%= f.text_field :token, + class: "block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6", + autocomplete: 'one-time-code' + %>
diff --git a/config/locales/passwordless.yml b/config/locales/passwordless.yml new file mode 100644 index 00000000..9115453c --- /dev/null +++ b/config/locales/passwordless.yml @@ -0,0 +1,5 @@ +en: + passwordless: + mailer: + sign_in: + subject: Sign in token for StaffPlan