summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/elevations/new.html.erb23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/views/elevations/new.html.erb b/app/views/elevations/new.html.erb
new file mode 100644
index 00000000..1091ff36
--- /dev/null
+++ b/app/views/elevations/new.html.erb
@@ -0,0 +1,23 @@
1<h1><%= t(".title") %></h1>
2
3<div id="admin_layout">
4 <% if current_user.otp_enrolled? %>
5 <p class="field_hint">
6 <%= t(".hint", :minutes => AuthenticatedSystem::ELEVATION_MAX_AGE.in_minutes.to_i) %>
7 </p>
8 <%= form_tag elevation_path do %>
9 <div class="layout_row_label"><%= t(".code") %></div>
10 <div class="layout_row_content">
11 <%= text_field_tag :code, nil, :autocomplete => "one-time-code",
12 :inputmode => "numeric", :autofocus => true %>
13 </div>
14 <div class="layout_row_label"></div>
15 <div class="layout_row_content"><%= submit_tag t(".elevate") %></div>
16 <% end %>
17 <% else %>
18 <%# An admin without an enrolled factor cannot elevate at all. Say so and
19 point at enrolment rather than showing a field that cannot work. %>
20 <p><%= t(".not_enrolled") %></p>
21 <%= link_to t(".enrol"), otp_enrollment_path, :class => "action_button" %>
22 <% end %>
23</div>