improves consistency of error messages [#110]
This commit is contained in:
@@ -4,11 +4,10 @@
|
||||
<h1 class="text-center"><%= t("devise_views.confirmations.title") %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= render 'shared/errors', resource: resource %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :email, t("devise_views.confirmations.email_label") %>
|
||||
<%= f.email_field :email, autofocus: true, placeholder: t("devise_views.confirmations.email_label"), value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,25 +1,30 @@
|
||||
<h2><%= t("devise_views.passwords.edit.title") %></h2>
|
||||
<div class="row auth">
|
||||
<div class="small-12 medium-8 large-5 column small-centered">
|
||||
<div class="panel">
|
||||
<h1 class="text-center"><%= t("devise_views.passwords.edit.title") %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= render 'shared/errors', resource: resource %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password, t("devise_views.passwords.edit.password_label") %><br />
|
||||
<% if @minimum_password_length %>
|
||||
<em><%= t("devise_views.passwords.edit.min_length", min: @minimum_password_length) %></em>
|
||||
<% end %><br />
|
||||
<%= f.password_field :password, autofocus: true, autocomplete: "off" %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.password_field :password, autofocus: true, autocomplete: "off",
|
||||
label: t("devise_views.passwords.edit.password_label") %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off",
|
||||
label: t("devise_views.passwords.edit.password_confirmation_label") %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit t("devise_views.passwords.edit.change_submit") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password_confirmation, t("devise_views.passwords.edit.password_confirmation_label") %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit t("devise_views.passwords.edit.change_submit") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
</div>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
<div class="panel">
|
||||
<h1 class="text-center"><%= t("devise_views.passwords.new.title") %></h1>
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= render 'shared/errors', resource: resource %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :email, t("devise_views.passwords.new.email_label") %>
|
||||
<%= f.email_field :email, autofocus: true, placeholder: t("devise_views.passwords.new.email_label") %>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<h2><%= t("devise_views.registrations.edit.edit") %> <%= resource_name.to_s.humanize %></h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= render 'shared/errors', resource: resource %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :email, t("devise_views.registrations.edit.email_label") %>
|
||||
<%= f.email_field :email, autofocus: true, placeholder: t("devise_views.registrations.edit.email_label") %>
|
||||
</div>
|
||||
|
||||
@@ -22,18 +22,21 @@
|
||||
<div class="small-12 column">
|
||||
<%= f.label :password, t("devise_views.registrations.edit.password_label") %>
|
||||
<span class="note"><%= t("devise_views.registrations.edit.leave_blank") %></span>
|
||||
<%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.registrations.edit.password_label") %>
|
||||
<%= f.password_field :password, autocomplete: "off",
|
||||
label: false,
|
||||
placeholder: t("devise_views.registrations.edit.password_label") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :password_confirmation, t("devise_views.registrations.edit.password_confirmation_label") %>
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off", placeholder: t("devise_views.registrations.edit.password_confirmation_label") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
<%= f.label :current_password, t("devise_views.registrations.edit.current_password_label") %>
|
||||
<span class="note"><%= t("devise_views.registrations.edit.need_current") %></span>
|
||||
<%= f.password_field :current_password, autocomplete: "off", placeholder: t("devise_views.registrations.edit.current_password_label") %>
|
||||
<%= f.password_field :current_password, autocomplete: "off",
|
||||
label: false,
|
||||
placeholder: t("devise_views.registrations.edit.current_password_label") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 column">
|
||||
|
||||
@@ -4,36 +4,26 @@
|
||||
<h2><%= t("devise_views.registrations.new.title") %></h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= render 'shared/errors', resource: resource %>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 column">
|
||||
<%= f.label :first_name, t("devise_views.registrations.new.first_name_label") %>
|
||||
<%= f.text_field :first_name, autofocus: true, placeholder: t("devise_views.registrations.new.first_name_label") %>
|
||||
<%= f.text_field :first_name, autofocus: true,
|
||||
placeholder: t("devise_views.registrations.new.first_name_label") %>
|
||||
<%= f.text_field :last_name, placeholder: t("devise_views.registrations.new.last_name_label") %>
|
||||
<%= f.email_field :email, placeholder: t("devise_views.registrations.new.email_label") %>
|
||||
<%= f.text_field :nickname, placeholder: t("devise_views.registrations.new.nickname_label") %>
|
||||
|
||||
<%= f.label :last_name, t("devise_views.registrations.new.last_name_label") %>
|
||||
<%= f.text_field :last_name, placeholder: t("devise_views.registrations.new.last_name_label") %>
|
||||
<%= f.check_box :use_nickname, label: t("devise_views.registrations.new.use_nickname_label") %>
|
||||
|
||||
<%= f.label :email, t("devise_views.registrations.new.email_label") %>
|
||||
<%= f.email_field :email, placeholder: t("devise_views.registrations.new.email_label") %>
|
||||
<%= f.password_field :password, autocomplete: "off",
|
||||
placeholder: t("devise_views.registrations.new.password_label") %>
|
||||
|
||||
<%= f.label :nickname, t("devise_views.registrations.new.nickname_label") %>
|
||||
<%= f.text_field :nickname, placeholder: t("devise_views.registrations.new.nickname_label") %>
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off",
|
||||
label: t("devise_views.registrations.new.password_confirmation_label"),
|
||||
placeholder: t("devise_views.registrations.new.password_confirmation_label") %>
|
||||
|
||||
<%= f.label :use_nickname do %>
|
||||
<%= f.check_box :use_nickname %>
|
||||
<span class="checkbox"><%= t("devise_views.registrations.new.use_nickname_label") %></span>
|
||||
<% end %>
|
||||
|
||||
<%= f.label :password, t("devise_views.registrations.new.password_label"), class: "inline-block" %>
|
||||
<% if @minimum_password_length %>
|
||||
<span class="inline-block"><%= t("devise_views.registrations.new.min_length", min: @minimum_password_length) %></span>
|
||||
<% end %>
|
||||
<%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.registrations.new.password_label") %>
|
||||
|
||||
<%= f.label :password_confirmation, t("devise_views.registrations.new.password_confirmation_label") %>
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off", placeholder: t("devise_views.registrations.new.password_confirmation_label") %>
|
||||
<%= f.simple_captcha %>
|
||||
<%= f.simple_captcha input_html: {required: false} %>
|
||||
|
||||
<%= f.submit t("devise_views.registrations.new.submit"), class: "button radius expand" %>
|
||||
</div>
|
||||
|
||||
@@ -6,21 +6,16 @@
|
||||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :email, t("devise_views.sessions.new.email_label") %>
|
||||
<%= f.email_field :email, autofocus: true, placeholder: t("devise_views.sessions.new.email_label") %>
|
||||
</div>
|
||||
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :password, t("devise_views.sessions.new.password_label") %>
|
||||
<%= f.password_field :password, autocomplete: "off", placeholder: t("devise_views.sessions.new.password_label") %>
|
||||
</div>
|
||||
|
||||
<% if devise_mapping.rememberable? -%>
|
||||
<div class="small-12 columns">
|
||||
<%= f.label :remember_me do %>
|
||||
<%= f.check_box :remember_me %>
|
||||
<span class="checkbox"><%= t("devise_views.sessions.new.remember_me") %>
|
||||
<% end %>
|
||||
<%= f.check_box :remember_me, label: t("devise_views.sessions.new.remember_me") %>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
<h2><%= t("devise_views.unlocks.new.title") %></h2>
|
||||
<div class="row auth">
|
||||
<div class="small-12 medium-8 large-5 column small-centered">
|
||||
<div class="panel">
|
||||
<h1 class="text-center"><%= t("devise_views.unlocks.new.title") %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= render 'shared/errors', resource: resource %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email, t("devise_views.unlocks.new.email_label") %><br />
|
||||
<%= f.email_field :email, autofocus: true %>
|
||||
<div class="field">
|
||||
<%= f.email_field :email, autofocus: true,
|
||||
label: t("devise_views.unlocks.new.email_label") %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit t("devise_views.unlocks.new.submit") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit t("devise_views.unlocks.new.submit") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user