Regenerated devise views

This commit is contained in:
echarp 2019-05-08 14:16:19 +02:00
parent 2fd8b9d7eb
commit e981d1360f
9 changed files with 43 additions and 56 deletions

View File

@ -1,10 +1,10 @@
%h2 Resend confirmation instructions %h2 Resend confirmation instructions
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages! = render "devise/shared/error_messages", resource: resource
.field .field
= f.label :email = f.label :email
%br/ %br/
= f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) = f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email)
.actions .actions
= f.submit "Resend confirmation instructions" = f.submit "Resend confirmation instructions"
= render "devise/shared/links" = render "devise/shared/links"

View File

@ -1,6 +1,6 @@
%h2 Change your password %h2 Change your password
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f|
= devise_error_messages! = render "devise/shared/error_messages", resource: resource
= f.hidden_field :reset_password_token = f.hidden_field :reset_password_token
.field .field
= f.label :password, "New password" = f.label :password, "New password"
@ -9,7 +9,7 @@
%em %em
(#{@minimum_password_length} characters minimum) (#{@minimum_password_length} characters minimum)
%br/ %br/
= f.password_field :password, autofocus: true, autocomplete: "off" = f.password_field :password, autofocus: true, autocomplete: "new-password"
.field .field
= f.label :password_confirmation, "Confirm new password" = f.label :password_confirmation, "Confirm new password"
%br/ %br/

View File

@ -1,10 +1,10 @@
%h2 Forgot your password? %h2 Forgot your password?
= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| = form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages! = render "devise/shared/error_messages", resource: resource
.field .field
= f.label :email = f.label :email
%br/ %br/
= f.email_field :email, autofocus: true = f.email_field :email, autofocus: true, autocomplete: "email"
.actions .actions
= f.submit "Send me reset password instructions" = f.submit "Send me reset password instructions"
= render "devise/shared/links" = render "devise/shared/links"

View File

@ -1,11 +1,11 @@
%h2 %h2
Edit #{resource_name.to_s.humanize} Edit #{resource_name.to_s.humanize}
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| = form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
= devise_error_messages! = render "devise/shared/error_messages", resource: resource
.field .field
= f.label :email = f.label :email
%br/ %br/
= f.email_field :email, autofocus: true = f.email_field :email, autofocus: true, autocomplete: "email"
- if devise_mapping.confirmable? && resource.pending_reconfirmation? - if devise_mapping.confirmable? && resource.pending_reconfirmation?
%div %div
Currently waiting confirmation for: #{resource.unconfirmed_email} Currently waiting confirmation for: #{resource.unconfirmed_email}
@ -13,7 +13,7 @@
= f.label :password = f.label :password
%i (leave blank if you don't want to change it) %i (leave blank if you don't want to change it)
%br/ %br/
= f.password_field :password, autocomplete: "off" = f.password_field :password, autocomplete: "new-password"
- if @minimum_password_length - if @minimum_password_length
%br/ %br/
%em %em
@ -22,12 +22,12 @@
.field .field
= f.label :password_confirmation = f.label :password_confirmation
%br/ %br/
= f.password_field :password_confirmation, autocomplete: "off" = f.password_field :password_confirmation, autocomplete: "new-password"
.field .field
= f.label :current_password = f.label :current_password
%i (we need your current password to confirm your changes) %i (we need your current password to confirm your changes)
%br/ %br/
= f.password_field :current_password, autocomplete: "off" = f.password_field :current_password, autocomplete: "current-password"
.actions .actions
= f.submit "Update" = f.submit "Update"
%h3 Cancel my account %h3 Cancel my account

View File

@ -1,21 +1,21 @@
%h2 Sign up %h2 Sign up
= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
= devise_error_messages! = render "devise/shared/error_messages", resource: resource
.field .field
= f.label :email = f.label :email
%br/ %br/
= f.email_field :email, autofocus: true = f.email_field :email, autofocus: true, autocomplete: "email"
.field .field
= f.label :password = f.label :password
- if @minimum_password_length - if @minimum_password_length
%em %em
(#{@minimum_password_length} characters minimum) (#{@minimum_password_length} characters minimum)
%br/ %br/
= f.password_field :password, autocomplete: "off" = f.password_field :password, autocomplete: "new-password"
.field .field
= f.label :password_confirmation = f.label :password_confirmation
%br/ %br/
= f.password_field :password_confirmation, autocomplete: "off" = f.password_field :password_confirmation, autocomplete: "new-password"
.actions .actions
= f.submit "Sign up" = f.submit "Sign up"
= render "devise/shared/links" = render "devise/shared/links"

View File

@ -1,20 +1,17 @@
%h2= t '.title' %h2 Log in
= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
%fieldset .field
= form_for resource, as: resource_name, = f.label :email
url: session_path(resource_name) do |f|
.field.login
= f.label :login
%br/ %br/
= f.text_field :login, autofocus: true = f.email_field :email, autofocus: true, autocomplete: "email"
.field.password .field
= f.label :password = f.label :password
%br/ %br/
= f.password_field :password, autocomplete: 'off' = f.password_field :password, autocomplete: "current-password"
- if devise_mapping.rememberable? - if devise_mapping.rememberable?
.field .field
= f.check_box :remember_me = f.check_box :remember_me
= f.label :remember_me = f.label :remember_me
.actions= f.submit t('.sign_in') .actions
= f.submit "Log in"
= render 'devise/shared/links' = render "devise/shared/links"

View File

@ -0,0 +1,9 @@
- if resource.errors.any?
#error_explanation
%h2
= I18n.t("errors.messages.not_saved", |
count: resource.errors.count, |
resource: resource.class.model_name.human.downcase) |
%ul
- resource.errors.full_messages.each do |message|
%li= message

View File

@ -1,19 +0,0 @@
- if controller_name != 'sessions'
= link_to "Sign in", new_session_path(resource_name)
%br/
- if devise_mapping.registerable? && controller_name != 'registrations'
= link_to "Sign up", new_registration_path(resource_name)
%br/
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
= link_to "Forgot your password?", new_password_path(resource_name)
%br/
- if devise_mapping.confirmable? && controller_name != 'confirmations'
= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name)
%br/
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name)
%br/
- if devise_mapping.omniauthable?
- resource_class.omniauth_providers.each do |provider|
= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)
%br/

View File

@ -1,10 +1,10 @@
%h2 Resend unlock instructions %h2 Resend unlock instructions
= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| = form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages! = render "devise/shared/error_messages", resource: resource
.field .field
= f.label :email = f.label :email
%br/ %br/
= f.email_field :email, autofocus: true = f.email_field :email, autofocus: true, autocomplete: "email"
.actions .actions
= f.submit "Resend unlock instructions" = f.submit "Resend unlock instructions"
= render "devise/shared/links" = render "devise/shared/links"