summaryrefslogtreecommitdiff
path: root/app/views/otp_enrollments/show.html.erb
blob: 03405d5fea20702e01a31517b640fcb52a92eafa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<h1><%= t(".title") %></h1>

<div id="admin_layout">
  <div class="layout_row">
    <div class="layout_row_label"><%= t(".scan") %></div>
    <div class="layout_row_content">
      <div class="otp_qr">
        <%= raw RQRCode::QRCode.new(current_user.pending_otp_provisioning_uri)
                  .as_svg(:module_size => 4, :viewbox => true,
                          :color => "000", :fill => "fff") %>
      </div>
      <span class="field_hint"><%= t(".manual_hint") %> <code><%= current_user.otp_pending_secret %></code></span>
    </div>
  </div>

  <div class="layout_row">
    <div class="layout_row_label"><%= t(".confirm") %></div>
    <div class="layout_row_content">
      <%= form_tag otp_enrollment_path, :method => :put, :class => "otp_form" do %>
        <%= text_field_tag :code, nil, :autofocus => true,
              :autocomplete => "one-time-code", :inputmode => "numeric" %>
        <%= button_tag :type => "submit", :class => "action_button" do %>
          <%= icon("shield-check", library: "tabler", "aria-hidden": true) %> <%= t(".confirm") %>
        <% end %>
      <% end %>
      <span class="field_hint"> <%= t(".app_hint", :issuer => OTP_ISSUER) %></span>
    </div>
  </div>
</div>