count-anything/app/views/profile/edit.html.erb
Louis Vallat 91e2018253
fix: removed email field from update current password
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
2023-04-06 20:07:44 +02:00

42 lines
1.4 KiB
Plaintext

<div class="mt-2 mb-4">
<div class="mt-2 mb-4">
<h3><%= t("fields.update_email") %></h3>
<%= form_tag profile_update_email_path, method: :post do %>
<div class="col-2 mt-2">
<%= label_tag :email, t("fields.email") %>
<%= email_field_tag :email, current_user.email, class: "form-control" %>
</div>
<div class="col-2 mt-2">
<%= label_tag :current_password, t("fields.current_password") %>
<%= password_field_tag :current_password, nil, class: "form-control" %>
</div>
<%= submit_tag t("fields.save"), class: "btn btn-primary mt-2" %>
<% end %>
</div>
<div class="mt-2 mb-4">
<h3><%= t("fields.update_password") %></h3>
<%= form_tag profile_update_password_path, method: :post do %>
<div class="col-2 mt-2">
<%= label_tag :password, t("fields.new_password") %>
<%= password_field_tag :password, nil, class: "form-control" %>
</div>
<div class="col-2 mt-2">
<%= label_tag :password_confirmation, t("fields.new_password_confirmation") %>
<%= password_field_tag :password_confirmation, nil, class: "form-control" %>
</div>
<div class="col-2 mt-2">
<%= label_tag :current_password, t("fields.current_password") %>
<%= password_field_tag :current_password, nil, class: "form-control" %>
</div>
<%= submit_tag t("fields.save"), class: "btn btn-primary mt-2" %>
<% end %>
</div>
</div>