Sha256: fb5a40d80a8542859929dcc5219a982a246f9240f9314823550ff2cdaa7601de

Contents?: true

Size: 1.85 KB

Versions: 25

Compression:

Stored size: 1.85 KB

Contents

<%= 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: "email", 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 %>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
rodauth-rails-1.8.0 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.7.1 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.7.0 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.6.4 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.6.3 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.6.2 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.6.1 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.6.0 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.5.5 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.5.4 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.5.2 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.5.1 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.5.0 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.4.2 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.4.1 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.4.0 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.3.1 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.3.0 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.2.2 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb
rodauth-rails-1.2.1 lib/generators/rodauth/templates/app/views/rodauth/_login_form.html.erb