<%= form_with url: rodauth.login_path, method: :post, data: { turbo: false } do |form| %>
  <% if rodauth.skip_login_field_on_login? %>
    <div class="form-group mb-3">
      <%= form.label "login", rodauth.login_label, class: "form-label" %>
      <%= form.email_field rodauth.login_param, value: params[rodauth.login_param], id: "login", readonly: true, class: "form-control-plaintext" %>
    </div>
  <% else %>
    <div class="form-group mb-3">
      <%= form.label "login", rodauth.login_label, class: "form-label" %>
      <%= form.email_field rodauth.login_param, value: params[rodauth.login_param], id: "login", autocomplete: rodauth.login_field_autocomplete_value, required: true, class: "form-control #{"is-invalid" if rodauth.field_error(rodauth.login_param)}", aria: ({ invalid: true, describedby: "login_error_message" } if rodauth.field_error(rodauth.login_param)) %>
      <%= content_tag(:span, rodauth.field_error(rodauth.login_param), class: "invalid-feedback", id: "login_error_message") if rodauth.field_error(rodauth.login_param) %>
    </div>
  <% end %>

  <% unless rodauth.skip_password_field_on_login? %>
    <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.submit rodauth.login_button, class: "btn btn-primary" %>
  </div>
<% end %>
