Skip to content

Commit

Permalink
Update simple_form views to match latest from devise
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonBarnabe committed Feb 4, 2018
1 parent a354d50 commit 0beb0b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/generators/devise/templates/simple_form_for/passwords/edit.html.erb
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<%= f.full_error :reset_password_token %>

<div class="form-inputs">
<%= f.input :password, label: t(".new_password"), required: true, autofocus: true %>
<%= f.input :password, label: t(".new_password"), required: true, autofocus: true, hint: (t('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length) %>
<%= f.input :password_confirmation, label: t(".confirm_new_password"), required: true %>
</div>

Expand Down
6 changes: 2 additions & 4 deletions lib/generators/devise/templates/simple_form_for/registrations/edit.html.erb
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h2><%= t(".title", resource: resource_class.model_name.human) %></h2>
<h2><%= t(".title", resource: resource_name.to_s.humanize) %></h2>

<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= f.error_notification %>
Expand All @@ -7,9 +7,7 @@
<%= f.input :email, required: true, autofocus: true %>

<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<p>
<%= t(".currently_waiting_confirmation_for_email", email: resource.unconfirmed_email) %>
</p>
<p><%= t(".currently_waiting_confirmation_for_email", email: resource.unconfirmed_email) %></p>
<% end %>

<%= f.input :password, autocomplete: "off", hint: t(".leave_blank_if_you_don_t_want_to_change_it"), required: false %>
Expand Down
2 changes: 1 addition & 1 deletion lib/generators/devise/templates/simple_form_for/registrations/new.html.erb
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="form-inputs">
<%= f.input :email, required: true, autofocus: true %>
<%= f.input :password, required: true %>
<%= f.input :password, required: true, hint: (t('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length) %>
<%= f.input :password_confirmation, required: true %>
</div>

Expand Down

0 comments on commit 0beb0b6

Please sign in to comment.