Files
nairobi/app/views/users/registrations/edit.html.erb
Julian Herrero defbb25ec5 Fix Devise deprecation warning
DEPRECATION WARNING: [Devise] `DeviseHelper.devise_error_messages!`
is deprecated and it will be removed in the next major version.
To customize the errors styles please run `rails g devise:views` and
modify the `devise/shared/error_messages` partial.

We will render the resource errors instead fo calling the deprecated method.
2019-04-17 17:40:56 +02:00

45 lines
2.3 KiB
Plaintext

<%= back_link_to %>
<h2><%= t("devise_views.users.registrations.edit.edit") %></h2>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
<%= render "shared/errors", resource: resource %>
<div class="row">
<div class="small-12 column">
<%= f.label :email, t("devise_views.users.registrations.edit.email_label") %>
<%= f.email_field :email, label: false, autofocus: true, placeholder: t("devise_views.users.registrations.edit.email_label") %>
</div>
<div class="small-12 column">
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div><%= t("devise_views.users.registrations.edit.waiting_for") %> <%= resource.unconfirmed_email %></div>
<% end %>
</div>
<div class="small-12 column">
<%= f.label :password, t("devise_views.users.registrations.edit.password_label") %>
<p class="help-text" id="password-help-text"><%= t("devise_views.users.registrations.edit.leave_blank") %></p>
<%= f.password_field :password, autocomplete: "off", label: false,
placeholder: t("devise_views.users.registrations.edit.password_label"),
aria: {describedby: "password-help-text"} %>
</div>
<div class="small-12 column">
<%= f.label :password_confirmation, t("devise_views.users.registrations.edit.password_confirmation_label") %>
<%= f.password_field :password_confirmation, label: false, autocomplete: "off", placeholder: t("devise_views.users.registrations.edit.password_confirmation_label") %>
</div>
<div class="small-12 column">
<%= f.label :current_password, t("devise_views.users.registrations.edit.current_password_label") %>
<p class="help-text" id="current-password-help-text"><%= t("devise_views.users.registrations.edit.need_current") %></p>
<%= f.password_field :current_password, label: false, autocomplete: "off",
placeholder: t("devise_views.users.registrations.edit.current_password_label"),
aria: {describedby: "current-password-help-text"} %>
</div>
<div class="small-12 column">
<%= f.submit t("devise_views.users.registrations.edit.update_submit"), class: "button" %>
</div>
</div>
<% end %>