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
= 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
= f.label :email
%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
= f.submit "Resend confirmation instructions"
= render "devise/shared/links"

View File

@ -1,6 +1,6 @@
%h2 Change your password
= 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
.field
= f.label :password, "New password"
@ -9,7 +9,7 @@
%em
(#{@minimum_password_length} characters minimum)
%br/
= f.password_field :password, autofocus: true, autocomplete: "off"
= f.password_field :password, autofocus: true, autocomplete: "new-password"
.field
= f.label :password_confirmation, "Confirm new password"
%br/

View File

@ -1,10 +1,10 @@
%h2 Forgot your password?
= 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
= f.label :email
%br/
= f.email_field :email, autofocus: true
= f.email_field :email, autofocus: true, autocomplete: "email"
.actions
= f.submit "Send me reset password instructions"
= render "devise/shared/links"

View File

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

View File

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

View File

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