Sha256: 96fcd8f94e4d2da0f11ea9b022aa8dd49b9f16f8cd2a1a56b3eead5aa1112d30

Contents?: true

Size: 1.85 KB

Versions: 10

Compression:

Stored size: 1.85 KB

Contents

<% content_for :title, rodauth.webauthn_remove_page_title %>

<%= 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

10 entries across 10 versions & 1 rubygems

Version Path
rodauth-rails-1.4.2 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.4.1 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.4.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.3.1 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.3.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.2.2 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.2.1 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.2.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.1.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb
rodauth-rails-1.0.0 lib/generators/rodauth/templates/app/views/rodauth/webauthn_remove.html.erb