2020-07-07 19:17:17 +08:00
|
|
|
<%= form_for(resource,
|
|
|
|
as: resource_name,
|
|
|
|
url: registration_path(resource_name, format: :json),
|
|
|
|
remote: true,
|
|
|
|
html: { method: :put, "data-for" => "password", class: 'settings-page-change-password', id: 'user-password-field' }) do |f| %>
|
|
|
|
<%= hidden_field_tag "user[change_password]", "true" %>
|
|
|
|
<div data-part="view">
|
|
|
|
<div class="form-group">
|
2023-01-26 21:01:54 +08:00
|
|
|
<h3><%= t("users.registrations.edit.password_label") %></h3>
|
2020-07-07 21:59:02 +08:00
|
|
|
<div class="user-attribute">
|
|
|
|
••••••••••••
|
2023-06-19 21:45:22 +08:00
|
|
|
<a href="#" class="btn btn-secondary" data-action="edit"><%=t("general.change") %></a>
|
2020-07-07 19:17:17 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div data-part="edit" style="display: none;">
|
|
|
|
<div class="well">
|
|
|
|
<h4><%=t "users.registrations.edit.password_title" %></h4>
|
2020-07-07 21:59:02 +08:00
|
|
|
<div class="form-group sci-input-container">
|
2020-07-07 19:17:17 +08:00
|
|
|
<%= f.label :current_password, t("users.registrations.edit.current_password_label") %> <i><%=t "users.registrations.edit.password_explanation" %></i>
|
2020-07-07 21:59:02 +08:00
|
|
|
<%= f.password_field :current_password, autocomplete: "off", class: "form-control sci-input-field", "data-role" => "clear", id: 'edit-password-current-password' %>
|
2020-07-07 19:17:17 +08:00
|
|
|
</div>
|
|
|
|
|
2020-07-07 21:59:02 +08:00
|
|
|
<div class="form-group sci-input-container">
|
2020-07-07 19:17:17 +08:00
|
|
|
<%= f.label :password, t("users.registrations.edit.new_password_label") %>
|
2020-07-07 21:59:02 +08:00
|
|
|
<%= f.password_field :password, autocomplete: "off", class: "form-control sci-input-field", "data-role" => "clear" %>
|
2020-07-07 19:17:17 +08:00
|
|
|
</div>
|
|
|
|
|
2020-07-07 21:59:02 +08:00
|
|
|
<div class="form-group sci-input-container">
|
2020-07-07 19:17:17 +08:00
|
|
|
<%= f.label :password_confirmation, t("users.registrations.edit.new_password_2_label") %>
|
2020-07-07 21:59:02 +08:00
|
|
|
<%= f.password_field :password_confirmation, autocomplete: "off", class: "form-control sci-input-field", "data-role" => "clear" %>
|
2020-07-07 19:17:17 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="align-right">
|
2020-07-07 21:59:02 +08:00
|
|
|
<a href="#" class="btn btn-light" data-action="cancel"><%=t "general.cancel" %></a>
|
2020-07-22 19:16:27 +08:00
|
|
|
<%= f.button t("general.save"), class: "btn btn-success" %>
|
2020-07-07 19:17:17 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|