<h1>Passwort ändern</h1>
<div class="row">
  <div class="col-md-4">
    <%= form_with url: rodauth.change_password_path, method: :post, data: { turbo: false } do |form| %>
      <% if rodauth.change_password_requires_password? %>
        <div class="form-group mb-3">
          <%= form.label "password", rodauth.password_label, class: "form-label" %>
          <%= form.password_field rodauth.password_param, value: "", id: "password", autocomplete: rodauth.password_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_param)}", aria: ({ invalid: true, describedby: "password_error_message" } if rodauth.field_error(rodauth.password_param)) %>
          <%= content_tag(:span, rodauth.field_error(rodauth.password_param), class: "invalid-feedback", id: "password_error_message") if rodauth.field_error(rodauth.password_param) %>
        </div>
      <% end %>

      <div class="form-group mb-3">
        <%= form.label "new-password", rodauth.new_password_label, class: "form-label" %>
        <%= form.password_field rodauth.new_password_param, value: "", id: "new-password", autocomplete: "new-password", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.new_password_param)}", aria: ({ invalid: true, describedby: "new-password_error_message" } if rodauth.field_error(rodauth.new_password_param)) %>
        <%= content_tag(:span, rodauth.field_error(rodauth.new_password_param), class: "invalid-feedback", id: "new-password_error_message") if rodauth.field_error(rodauth.new_password_param) %>
      </div>

      <% if rodauth.require_password_confirmation? %>
        <div class="form-group mb-3">
          <%= form.label "password-confirm", rodauth.password_confirm_label, class: "form-label" %>
          <%= form.password_field rodauth.password_confirm_param, value: "", id: "password-confirm", autocomplete: "new-password", required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.password_confirm_param)}", aria: ({ invalid: true, describedby: "password-confirm_error_message" } if rodauth.field_error(rodauth.password_confirm_param)) %>
          <%= content_tag(:span, rodauth.field_error(rodauth.password_confirm_param), class: "invalid-feedback", id: "password-confirm_error_message") if rodauth.field_error(rodauth.password_confirm_param) %>
        </div>
      <% end %>

      <div class="form-group mb-3">
        <%= form.submit rodauth.change_password_button, class: "btn btn-primary" %>
      </div>
    <% end %>
  </div>
</div>