devise-foundation-views 0.1.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +76 -0
  3. data/.gitignore +32 -3
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +44 -0
  6. data/CHANGELOG.md +76 -0
  7. data/CODE_OF_CONDUCT.md +9 -0
  8. data/Gemfile +9 -2
  9. data/README.md +102 -25
  10. data/Rakefile +6 -2
  11. data/UPGRADE_GUIDE.md +87 -0
  12. data/app/assets/stylesheets/devise_foundation_layout.css +49 -0
  13. data/app/assets/stylesheets/devise_foundation_views.css +53 -0
  14. data/app/assets/stylesheets/devise_foundation_views_less.less +47 -8
  15. data/app/assets/stylesheets/devise_foundation_views_scss.scss +48 -8
  16. data/app/views/devise/confirmations/new.html.erb +15 -19
  17. data/app/views/devise/mailer/confirmation_instructions.html.erb +3 -4
  18. data/app/views/devise/mailer/reset_password_instructions.html.erb +5 -5
  19. data/app/views/devise/mailer/unlock_instructions.html.erb +4 -4
  20. data/app/views/devise/passwords/edit.html.erb +23 -21
  21. data/app/views/devise/passwords/new.html.erb +15 -18
  22. data/app/views/devise/registrations/edit.html.erb +47 -25
  23. data/app/views/devise/registrations/new.html.erb +26 -22
  24. data/app/views/devise/sessions/new.html.erb +29 -23
  25. data/app/views/devise/shared/_error_messages.html.erb +17 -0
  26. data/app/views/devise/shared/_foundation_layout.html.erb +12 -0
  27. data/app/views/devise/shared/_links.html.erb +22 -20
  28. data/app/views/devise/unlocks/new.html.erb +15 -18
  29. data/app/views/devise_haml/confirmations/new.html.haml +10 -13
  30. data/app/views/devise_haml/mailer/confirmation_instructions.html.haml +3 -3
  31. data/app/views/devise_haml/mailer/reset_password_instructions.html.haml +5 -5
  32. data/app/views/devise_haml/mailer/unlock_instructions.html.haml +4 -4
  33. data/app/views/devise_haml/passwords/edit.html.haml +16 -16
  34. data/app/views/devise_haml/passwords/new.html.haml +10 -13
  35. data/app/views/devise_haml/registrations/edit.html.haml +32 -22
  36. data/app/views/devise_haml/registrations/new.html.haml +18 -17
  37. data/app/views/devise_haml/sessions/new.html.haml +18 -17
  38. data/app/views/devise_haml/shared/_error_messages.html.haml +9 -0
  39. data/app/views/devise_haml/shared/_foundation_layout.html.haml +7 -0
  40. data/app/views/devise_haml/shared/_links.html.haml +20 -19
  41. data/app/views/devise_haml/unlocks/new.html.haml +10 -13
  42. data/app/views/devise_slim/confirmations/new.html.slim +10 -13
  43. data/app/views/devise_slim/mailer/confirmation_instructions.html.slim +3 -4
  44. data/app/views/devise_slim/mailer/reset_password_instructions.html.slim +5 -6
  45. data/app/views/devise_slim/mailer/unlock_instructions.html.slim +4 -4
  46. data/app/views/devise_slim/passwords/edit.html.slim +16 -17
  47. data/app/views/devise_slim/passwords/new.html.slim +10 -13
  48. data/app/views/devise_slim/registrations/edit.html.slim +32 -23
  49. data/app/views/devise_slim/registrations/new.html.slim +18 -18
  50. data/app/views/devise_slim/sessions/new.html.slim +18 -17
  51. data/app/views/devise_slim/shared/_error_messages.html.slim +9 -0
  52. data/app/views/devise_slim/shared/_foundation_layout.html.slim +7 -0
  53. data/app/views/devise_slim/shared/_links.html.slim +20 -19
  54. data/app/views/devise_slim/unlocks/new.html.slim +10 -14
  55. data/bin/console +8 -0
  56. data/bin/setup +5 -0
  57. data/devise-foundation-views.gemspec +28 -17
  58. data/lib/devise-foundation-views.rb +16 -19
  59. data/lib/devise_foundation_views_helper.rb +3 -17
  60. data/lib/devise_layout_helper.rb +18 -0
  61. data/lib/generators/devise/views/foundation_layout/foundation_layout_generator.rb +34 -0
  62. data/lib/generators/devise/views/foundation_layout/templates/layouts/devise.html.erb +37 -0
  63. data/lib/generators/devise/views/foundation_templates/foundation_templates_generator.rb +19 -15
  64. data/lib/version.rb +3 -1
  65. data/locales/uk.yml +1 -1
  66. metadata +108 -19
  67. data/.travis.yml +0 -8
@@ -1,13 +1,10 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post}) do |f|
7
- .row
8
- %h5.text-center= t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions')
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.submit t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions'), class: "button expand large-12 large-centered columns"
13
- = render "devise/shared/links"
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".resend_confirmation_instructions", default: "Resend confirmation instructions") } do
2
+ = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email)
8
+ .cell
9
+ = f.submit t(".resend_confirmation_instructions", default: "Resend confirmation instructions"), class: "button expanded"
10
+ = render "devise/shared/links"
@@ -1,3 +1,3 @@
1
- %p= t('.greeting', :recipient => @resource.email, :default => "Welcome #{@resource.email}!")
2
- %p= t('.instruction', :default => "You can confirm your account email through the link below:")
3
- %p= link_to t('.action', :default => "Confirm my account"),confirmation_url(@resource, :confirmation_token => @token, locale: I18n.locale)
1
+ %p= t(".welcome", email: @email, default: "Welcome #{@email}!")
2
+ %p= t(".instruction", default: "You can confirm your account email through the link below:")
3
+ %p= link_to t(".confirm_my_account", default: "Confirm my account"), confirmation_url(@resource, confirmation_token: @token)
@@ -1,5 +1,5 @@
1
- %p= t('.greeting', :recipient => @resource.email, :default => "Hello #{@resource.email}!")
2
- %p= t('.instruction', :default => "Someone has requested a link to change your password, and you can do this through the link below.")
3
- %p= link_to t('.action', :default => "Change my password"), edit_password_url(@resource, :reset_password_token => @token, locale: I18n.locale)
4
- %p= t('.instruction_2', :default => "If you didn't request this, please ignore this email.")
5
- %p= t('.instruction_3', :default => "Your password won't change until you access the link above and create a new one.")
1
+ %p= t(".hello", email: @resource.email, default: "Hello #{@resource.email}!")
2
+ %p= t(".someone_requested_a_link", default: "Someone has requested a link to change your password. You can do this through the link below.")
3
+ %p= link_to t(".change_my_password", default: "Change my password"), edit_password_url(@resource, reset_password_token: @token)
4
+ %p= t(".if_you_didnt_request", default: "If you didn't request this, please ignore this email.")
5
+ %p= t(".password_wont_change", default: "Your password won't change until you access the link above and create a new one.")
@@ -1,4 +1,4 @@
1
- %p= t('.greeting', :recipient => @resource.email, :default => "Hello #{@resource.email}!")
2
- %p= t('.message', :default => "Your account has been locked due to an excessive amount of unsuccessful sign in attempts.")
3
- %p= t('.instruction', :default => "Click the link below to unlock your account:")
4
- %p= link_to t('.action', :default => "Unlock my account"), unlock_url(@resource, :unlock_token => @resource.unlock_token, locale: I18n.locale)
1
+ %p= t(".hello", email: @resource.email, default: "Hello #{@resource.email}!")
2
+ %p= t(".account_locked", default: "Your account has been locked due to an excessive number of unsuccessful sign in attempts.")
3
+ %p= t(".click_link_below", default: "Click the link below to unlock your account:")
4
+ %p= link_to t(".unlock_my_account", default: "Unlock my account"), unlock_url(@resource, unlock_token: @token)
@@ -1,16 +1,16 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put}) do |f|
7
- = f.hidden_field :reset_password_token
8
- .row
9
- %h5.text-center= t('.change_your_password', :default => 'Change your password')
10
- .row
11
- = f.password_field :password, autocomplete: "off", class: "large-12 columns", placeholder: "New Password"
12
- .row
13
- = f.password_field :password_confirmation, autocomplete: "off", class: "large-12 columns", placeholder: "Confirm New Password"
14
- .row
15
- = f.submit t('.change_my_password', :default => 'Change my password'), class: "button expand large-12 large-centered columns"
16
- = render "devise/shared/links"
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".change_your_password", default: "Change your password") } do
2
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ = f.hidden_field :reset_password_token
5
+ .grid-x.grid-padding-x
6
+ .cell
7
+ = f.label :password, t(".new_password", default: "New password")
8
+ - if @minimum_password_length
9
+ %p.help-text= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "(#{@minimum_password_length} characters minimum)")
10
+ = f.password_field :password, autofocus: true, autocomplete: "new-password"
11
+ .cell
12
+ = f.label :password_confirmation, t(".confirm_new_password", default: "Confirm new password")
13
+ = f.password_field :password_confirmation, autocomplete: "new-password"
14
+ .cell
15
+ = f.submit t(".change_my_password", default: "Change my password"), class: "button expanded"
16
+ = render "devise/shared/links"
@@ -1,13 +1,10 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post}) do |f|
7
- .row
8
- %h5.text-center= t('.forgot_your_password', :default => 'Forgot your password?')
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.submit t('.send_me_reset_password_instructions', :default => "Send me reset password instructions"), class: "button expand large-12 large-centered columns"
13
- = render "devise/shared/links"
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".forgot_your_password", default: "Forgot your password?") } do
2
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email"
8
+ .cell
9
+ = f.submit t(".send_me_reset_password_instructions", default: "Send me password reset instructions"), class: "button expanded"
10
+ = render "devise/shared/links"
@@ -1,22 +1,32 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f|
7
- .row
8
- %h5.text-center= t('.title', :resource => resource_class.model_name.human , :default => "Edit #{resource_name.to_s.humanize}")
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.password_field :password, autocomplete: "off", class: "large-12 columns", placeholder: "Password", title: "leave blank if you don't want to change it"
13
- .row
14
- = f.password_field :password_confirmation, autocomplete: "off", class: "large-12 columns", placeholder: "Password Confirmation"
15
- .row
16
- = f.password_field :current_password, autocomplete: "off", class: "large-12 columns", placeholder: "Current Password", title: "we need your current password to confirm your changes"
17
- .row
18
- = f.submit t('.update', :default => "Update"), class: "button expand large-12 large-centered columns"
19
- %p
20
- = t('.unhappy', :default => 'Unhappy')
21
- ? #{link_to t('.cancel_my_account', :default => "Cancel my account"), registration_path(resource_name), :data => { :confirm => t('.are_you_sure', :default => "Are you sure?") }, :method => :delete}.
22
- = link_to t('.back', :default => 'Back'), :back
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".title", resource: resource_class.model_name.human, default: "Edit #{resource_name.to_s.humanize}") } do
2
+ = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email"
8
+ - if devise_mapping.confirmable? && resource.pending_reconfirmation?
9
+ .cell
10
+ .callout.warning
11
+ = t(".currently_waiting_confirmation", email: resource.unconfirmed_email, default: "Currently waiting confirmation for: #{resource.unconfirmed_email}")
12
+ .cell
13
+ = f.label :password
14
+ %p.help-text= t(".leave_blank_if_you_don_t_want_to_change_it", default: "(leave blank if you don't want to change it)")
15
+ = f.password_field :password, autocomplete: "new-password"
16
+ - if @minimum_password_length
17
+ %p.help-text= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "#{@minimum_password_length} characters minimum")
18
+ .cell
19
+ = f.label :password_confirmation
20
+ = f.password_field :password_confirmation, autocomplete: "new-password"
21
+ .cell
22
+ = f.label :current_password
23
+ %p.help-text= t(".we_need_your_current_password_to_confirm_your_changes", default: "(we need your current password to confirm your changes)")
24
+ = f.password_field :current_password, autocomplete: "current-password"
25
+ .cell
26
+ = f.submit t(".update", default: "Update"), class: "button expanded"
27
+ .text-center
28
+ %h3= t(".cancel_my_account", default: "Cancel my account")
29
+ %p
30
+ = t(".unhappy", default: "Unhappy")
31
+ = button_to t(".cancel_my_account", default: "Cancel my account"), registration_path(resource_name), data: { confirm: t(".are_you_sure", default: "Are you sure?"), turbo_confirm: t(".are_you_sure", default: "Are you sure?") }, method: :delete, class: "button alert expanded"
32
+ = link_to t(".back", default: "Back"), :back
@@ -1,17 +1,18 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
7
- .row
8
- %h5.text-center= t('.sign_up', :default => "Sign up")
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.password_field :password, autocomplete: "off", class: "large-12 columns", placeholder: "Password"
13
- .row
14
- = f.password_field :password_confirmation, autocomplete: "off", class: "large-12 columns", placeholder: "Password Confirmation"
15
- .row
16
- = f.submit t('.sign_up', :default => "Sign up"), class: "button expand large-12 large-centered columns"
17
- = render "devise/shared/links"
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".sign_up", default: "Sign up") } do
2
+ = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email"
8
+ .cell
9
+ = f.label :password
10
+ - if @minimum_password_length
11
+ %p.help-text= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "(#{@minimum_password_length} characters minimum)")
12
+ = f.password_field :password, autocomplete: "new-password"
13
+ .cell
14
+ = f.label :password_confirmation
15
+ = f.password_field :password_confirmation, autocomplete: "new-password"
16
+ .cell
17
+ = f.submit t(".sign_up", default: "Sign up"), class: "button expanded"
18
+ = render "devise/shared/links"
@@ -1,19 +1,20 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
7
- .row
8
- %h5.text-center= t('.sign_in', :default => "Sign in")
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.password_field :password, autocomplete: "off", class: "large-12 columns", placeholder: "Password"
13
- - if devise_mapping.rememberable?
14
- .row
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".sign_in", default: "Log in") } do
2
+ = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email"
8
+ .cell
9
+ = f.label :password
10
+ = f.password_field :password, autocomplete: "current-password"
11
+ - if devise_mapping.rememberable?
12
+ .cell
13
+ .grid-x.align-middle
14
+ .cell.shrink
15
15
  = f.check_box :remember_me
16
+ .cell.auto
16
17
  = f.label :remember_me
17
- .row
18
- = f.submit t('.sign_in', :default => "Sign in"), class: "button expand large-12 large-centered columns"
19
- = render "devise/shared/links"
18
+ .cell
19
+ = f.submit t(".sign_in", default: "Log in"), class: "button expanded"
20
+ = render "devise/shared/links"
@@ -0,0 +1,9 @@
1
+ - if resource.errors.any?
2
+ #error_explanation.callout.alert{ data: { closable: true }, role: "alert" }
3
+ %h2
4
+ = I18n.t("errors.messages.not_saved", count: resource.errors.count, resource: resource.class.model_name.human.downcase)
5
+ %ul.no-bullet
6
+ - resource.errors.full_messages.each do |message|
7
+ %li= message
8
+ %button.close-button{ "aria-label" => t("devise.shared.error_messages.close", default: "Dismiss alert"), type: "button", data: { close: true } }
9
+ %span{ "aria-hidden" => true } ×
@@ -0,0 +1,7 @@
1
+ .grid-container.devise-foundation-views
2
+ .grid-x.grid-padding-x.align-center
3
+ .medium-10.large-7.cell
4
+ .devise-form-card
5
+ - if local_assigns[:title].present?
6
+ %h2.text-center.devise-form-card__title= title
7
+ = yield
@@ -1,19 +1,20 @@
1
- - if controller_name != 'sessions'
2
- = link_to t(".sign_in", :default => "Sign in"), new_session_path(resource_name)
3
- %br/
4
- - if devise_mapping.registerable? && controller_name != 'registrations'
5
- = link_to t(".sign_up", :default => "Sign up"), new_registration_path(resource_name)
6
- %br/
7
- - if devise_mapping.recoverable? && controller_name != 'passwords'
8
- = link_to t(".forgot_your_password", :default => "Forgot your password?"), new_password_path(resource_name)
9
- %br/
10
- - if devise_mapping.confirmable? && controller_name != 'confirmations'
11
- = link_to t('.didn_t_receive_confirmation_instructions', :default => "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name)
12
- %br/
13
- - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
14
- = link_to t('.didn_t_receive_unlock_instructions', :default => "Didn't receive unlock instructions?"), new_unlock_path(resource_name)
15
- %br/
16
- - if devise_mapping.omniauthable?
17
- - resource_class.omniauth_providers.each do |provider|
18
- = link_to t('.sign_in_with_provider', :provider => provider.to_s.titleize, :default => "Sign in with #{provider.to_s.titleize}"), omniauth_authorize_path(resource_name, provider)
19
- %br/
1
+ .devise-links.text-center
2
+ - if controller_name != 'sessions'
3
+ = link_to t(".sign_in", default: "Log in"), new_session_path(resource_name)
4
+ %br/
5
+ - if devise_mapping.registerable? && controller_name != 'registrations'
6
+ = link_to t(".sign_up", default: "Sign up"), new_registration_path(resource_name)
7
+ %br/
8
+ - if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
9
+ = link_to t(".forgot_your_password", default: "Forgot your password?"), new_password_path(resource_name)
10
+ %br/
11
+ - if devise_mapping.confirmable? && controller_name != 'confirmations'
12
+ = link_to t(".didn_t_receive_confirmation_instructions", default: "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name)
13
+ %br/
14
+ - if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
15
+ = link_to t(".didn_t_receive_unlock_instructions", default: "Didn't receive unlock instructions?"), new_unlock_path(resource_name)
16
+ %br/
17
+ - if devise_mapping.omniauthable?
18
+ - resource_class.omniauth_providers.each do |provider|
19
+ = button_to t(".sign_in_with_provider", provider: OmniAuth::Utils.camelize(provider), default: "Sign in with #{OmniAuth::Utils.camelize(provider)}"), omniauth_authorize_path(resource_name, provider), data: { turbo: false }, class: "button hollow expanded"
20
+ %br/
@@ -1,13 +1,10 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post}) do |f|
7
- .row
8
- %h5.text-center= t('.resend_unlock_instructions', :default => "Resend unlock instructions")
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.submit t('.resend_unlock_instructions', :default => "Resend unlock instructions"), class: "button expand large-12 large-centered columns"
13
- = render "devise/shared/links"
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".resend_unlock_instructions", default: "Resend unlock instructions") } do
2
+ = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email"
8
+ .cell
9
+ = f.submit t(".resend_unlock_instructions", default: "Resend unlock instructions"), class: "button expanded"
10
+ = render "devise/shared/links"
@@ -1,13 +1,10 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post}) do |f|
7
- .row
8
- h5.text-center= t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions')
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.submit t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions'), class: "button expand large-12 large-centered columns"
13
- = render "devise/shared/links"
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".resend_confirmation_instructions", default: "Resend confirmation instructions") } do
2
+ = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email)
8
+ .cell
9
+ = f.submit t(".resend_confirmation_instructions", default: "Resend confirmation instructions"), class: "button expanded"
10
+ = render "devise/shared/links"
@@ -1,4 +1,3 @@
1
- p= t('.greeting', :recipient => @resource.email, :default => "Welcome # @resource.email !")
2
- p= t('.instruction', :default => "You can confirm your account email through the link below:")
3
- p= link_to t('.action', :default => "Confirm my account"),confirmation_url(@resource, :confirmation_token => @token, locale: I18n.locale)
4
-
1
+ p= t(".welcome", email: @email, default: "Welcome #{@email}!")
2
+ p= t(".instruction", default: "You can confirm your account email through the link below:")
3
+ p= link_to t(".confirm_my_account", default: "Confirm my account"), confirmation_url(@resource, confirmation_token: @token)
@@ -1,6 +1,5 @@
1
- p= t('.greeting', :recipient => @resource.email, :default => "Hello # @resource.email !")
2
- p= t('.instruction', :default => "Someone has requested a link to change your password, and you can do this through the link below.")
3
- p= link_to t('.action', :default => "Change my password"), edit_password_url(@resource, :reset_password_token => @token, locale: I18n.locale)
4
- p= t('.instruction_2', :default => "If you didn't request this, please ignore this email.")
5
- p= t('.instruction_3', :default => "Your password won't change until you access the link above and create a new one.")
6
-
1
+ p= t(".hello", email: @resource.email, default: "Hello #{@resource.email}!")
2
+ p= t(".someone_requested_a_link", default: "Someone has requested a link to change your password. You can do this through the link below.")
3
+ p= link_to t(".change_my_password", default: "Change my password"), edit_password_url(@resource, reset_password_token: @token)
4
+ p= t(".if_you_didnt_request", default: "If you didn't request this, please ignore this email.")
5
+ p= t(".password_wont_change", default: "Your password won't change until you access the link above and create a new one.")
@@ -1,4 +1,4 @@
1
- p= t('.greeting', :recipient => @resource.email, :default => "Hello # @resource.email !")
2
- p= t('.message', :default => "Your account has been locked due to an excessive amount of unsuccessful sign in attempts.")
3
- p= t('.instruction', :default => "Click the link below to unlock your account:")
4
- p= link_to t('.action', :default => "Unlock my account"), unlock_url(@resource, :unlock_token => @resource.unlock_token, locale: I18n.locale)
1
+ p= t(".hello", email: @resource.email, default: "Hello #{@resource.email}!")
2
+ p= t(".account_locked", default: "Your account has been locked due to an excessive number of unsuccessful sign in attempts.")
3
+ p= t(".click_link_below", default: "Click the link below to unlock your account:")
4
+ p= link_to t(".unlock_my_account", default: "Unlock my account"), unlock_url(@resource, unlock_token: @token)
@@ -1,17 +1,16 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put}) do |f|
7
- = f.hidden_field :reset_password_token
8
- .row
9
- h5.text-center= t('.change_your_password', :default => 'Change your password')
10
- .row
11
- = f.password_field :password, autocomplete: "off", class: "large-12 columns", placeholder: "New Password"
12
- .row
13
- = f.password_field :password_confirmation, autocomplete: "off", class: "large-12 columns", placeholder: "Confirm New Password"
14
- .row
15
- = f.submit t('.change_my_password', :default => 'Change my password'), class: "button expand large-12 large-centered columns"
16
- = render "devise/shared/links"
17
-
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".change_your_password", default: "Change your password") } do
2
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ = f.hidden_field :reset_password_token
5
+ .grid-x.grid-padding-x
6
+ .cell
7
+ = f.label :password, t(".new_password", default: "New password")
8
+ - if @minimum_password_length
9
+ p.help-text= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "(#{@minimum_password_length} characters minimum)")
10
+ = f.password_field :password, autofocus: true, autocomplete: "new-password"
11
+ .cell
12
+ = f.label :password_confirmation, t(".confirm_new_password", default: "Confirm new password")
13
+ = f.password_field :password_confirmation, autocomplete: "new-password"
14
+ .cell
15
+ = f.submit t(".change_my_password", default: "Change my password"), class: "button expanded"
16
+ = render "devise/shared/links"
@@ -1,13 +1,10 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post}) do |f|
7
- .row
8
- h5.text-center= t('.forgot_your_password', :default => 'Forgot your password?')
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.submit t('.send_me_reset_password_instructions', :default => "Send me reset password instructions"), class: "button expand large-12 large-centered columns"
13
- = render "devise/shared/links"
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".forgot_your_password", default: "Forgot your password?") } do
2
+ = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email"
8
+ .cell
9
+ = f.submit t(".send_me_reset_password_instructions", default: "Send me password reset instructions"), class: "button expanded"
10
+ = render "devise/shared/links"
@@ -1,23 +1,32 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f|
7
- .row
8
- h5.text-center= t('.title', :resource => resource_class.model_name.human , :default => "Edit # resource_name.to_s.humanize ")
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.password_field :password, autocomplete: "off", class: "large-12 columns", placeholder: "Password", title: "leave blank if you don't want to change it"
13
- .row
14
- = f.password_field :password_confirmation, autocomplete: "off", class: "large-12 columns", placeholder: "Password Confirmation"
15
- .row
16
- = f.password_field :current_password, autocomplete: "off", class: "large-12 columns", placeholder: "Current Password", title: "we need your current password to confirm your changes"
17
- .row
18
- = f.submit t('.update', :default => "Update"), class: "button expand large-12 large-centered columns"
19
- p
20
- = t('.unhappy', :default => 'Unhappy')
21
- | ? #{link_to t('.cancel_my_account', :default => "Cancel my account"), registration_path(resource_name), :data => { :confirm => t('.are_you_sure', :default => "Are you sure?") }, :method => :delete}.
22
- = link_to t('.back', :default => 'Back'), :back
23
-
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".title", resource: resource_class.model_name.human, default: "Edit #{resource_name.to_s.humanize}") } do
2
+ = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email"
8
+ - if devise_mapping.confirmable? && resource.pending_reconfirmation?
9
+ .cell
10
+ .callout.warning
11
+ = t(".currently_waiting_confirmation", email: resource.unconfirmed_email, default: "Currently waiting confirmation for: #{resource.unconfirmed_email}")
12
+ .cell
13
+ = f.label :password
14
+ p.help-text= t(".leave_blank_if_you_don_t_want_to_change_it", default: "(leave blank if you don't want to change it)")
15
+ = f.password_field :password, autocomplete: "new-password"
16
+ - if @minimum_password_length
17
+ p.help-text= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "#{@minimum_password_length} characters minimum")
18
+ .cell
19
+ = f.label :password_confirmation
20
+ = f.password_field :password_confirmation, autocomplete: "new-password"
21
+ .cell
22
+ = f.label :current_password
23
+ p.help-text= t(".we_need_your_current_password_to_confirm_your_changes", default: "(we need your current password to confirm your changes)")
24
+ = f.password_field :current_password, autocomplete: "current-password"
25
+ .cell
26
+ = f.submit t(".update", default: "Update"), class: "button expanded"
27
+ .text-center
28
+ h3= t(".cancel_my_account", default: "Cancel my account")
29
+ p
30
+ = t(".unhappy", default: "Unhappy")
31
+ = button_to t(".cancel_my_account", default: "Cancel my account"), registration_path(resource_name), data: { confirm: t(".are_you_sure", default: "Are you sure?"), turbo_confirm: t(".are_you_sure", default: "Are you sure?") }, method: :delete, class: "button alert expanded"
32
+ = link_to t(".back", default: "Back"), :back
@@ -1,18 +1,18 @@
1
- = foundation_devise_error_messages!
2
- .large-3.large-centered.columns
3
- .login-box
4
- .row
5
- .large-12.columns
6
- = form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
7
- .row
8
- h5.text-center= t('.sign_up', :default => "Sign up")
9
- .row
10
- = f.email_field :email, autofocus: true, class: "large-12 columns", placeholder: "Email"
11
- .row
12
- = f.password_field :password, autocomplete: "off", class: "large-12 columns", placeholder: "Password"
13
- .row
14
- = f.password_field :password_confirmation, autocomplete: "off", class: "large-12 columns", placeholder: "Password Confirmation"
15
- .row
16
- = f.submit t('.sign_up', :default => "Sign up"), class: "button expand large-12 large-centered columns"
17
- = render "devise/shared/links"
18
-
1
+ = render layout: "devise/shared/foundation_layout", locals: { title: t(".sign_up", default: "Sign up") } do
2
+ = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
3
+ = render "devise/shared/error_messages", resource: resource
4
+ .grid-x.grid-padding-x
5
+ .cell
6
+ = f.label :email
7
+ = f.email_field :email, autofocus: true, autocomplete: "email"
8
+ .cell
9
+ = f.label :password
10
+ - if @minimum_password_length
11
+ p.help-text= t("devise.shared.minimum_password_length", count: @minimum_password_length, default: "(#{@minimum_password_length} characters minimum)")
12
+ = f.password_field :password, autocomplete: "new-password"
13
+ .cell
14
+ = f.label :password_confirmation
15
+ = f.password_field :password_confirmation, autocomplete: "new-password"
16
+ .cell
17
+ = f.submit t(".sign_up", default: "Sign up"), class: "button expanded"
18
+ = render "devise/shared/links"