Sha256: 449bf2f8383645454b9e7426cb1ac24c579a98ef64874b58924f414bac1a50f0

Contents?: true

Size: 1.79 KB

Versions: 23

Compression:

Stored size: 1.79 KB

Contents

<%= form_with url: rodauth.webauthn_remove_path, method: :post, id: "webauthn-remove-form", data: { turbo: false } do |form| %>
  <% if rodauth.two_factor_modifications_require_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 %>

  <fieldset class="form-group mb-3">
    <% (usage = rodauth.account_webauthn_usage).each do |id, last_use| %>
      <div class="form-check">
        <%= form.radio_button rodauth.webauthn_remove_param, id, id: "webauthn-remove-#{id}", class: "form-check-input #{"is-invalid" if rodauth.field_error(rodauth.webauthn_remove_param)}", aria: ({ invalid: true, describedby: "webauthn_remove_error_message" } if rodauth.field_error(rodauth.webauthn_remove_param)) %>
        <%= form.label "webauthn-remove-#{id}", "Last use: #{last_use}", class: "form-check-label" %>
        <%= content_tag(:span, rodauth.field_error(rodauth.webauthn_remove_param), class: "invalid-feedback", id: "webauthn_remove_error_message") if rodauth.field_error(rodauth.webauthn_remove_param) && id == usage.keys.last %>
      </div>
    <% end %>
  </fieldset>

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

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
rodauth-rails-1.14.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
plutonium-0.6.2 lib/generators/pu/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
plutonium-0.6.1 lib/generators/pu/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
plutonium-0.6.0 lib/generators/pu/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
plutonium-0.5.0 lib/generators/pu/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.13.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.12.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.11.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.10.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.9.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.8.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.7.1 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.7.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.6.4 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.6.3 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.6.2 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.6.1 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.6.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.5.5 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.5.4 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb