From 445362ed2f8591d54a3c34cb3c5a69049aefa8c6 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Sat, 15 Aug 2026 16:28:21 +0200 Subject: Style totp input fields so that they work better on mobile --- app/views/otp_enrollments/show.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/views/otp_enrollments/show.html.erb') diff --git a/app/views/otp_enrollments/show.html.erb b/app/views/otp_enrollments/show.html.erb index 16addb5b..a7604dd2 100644 --- a/app/views/otp_enrollments/show.html.erb +++ b/app/views/otp_enrollments/show.html.erb @@ -18,12 +18,13 @@
<%= form_tag otp_enrollment_path, :method => :put, :class => "otp_form" do %> <%= text_field_tag :code, nil, :autofocus => true, - :autocomplete => "one-time-code", :inputmode => "numeric" %> + :autocomplete => "one-time-code", :inputmode => "numeric", + :maxlength => 6, :pattern => "[0-9]{6}", :class => "otp_code" %> + <%= t(".app_hint", :issuer => OTP_ISSUER) %> <%= button_tag :type => "submit", :class => "action_button" do %> <%= icon("shield-check", library: "tabler", "aria-hidden": true) %> <%= t(".confirm") %> <% end %> <% end %> - <%= t(".app_hint", :issuer => OTP_ISSUER) %>
-- cgit v1.3