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_challenges/new.html.erb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'app/views/otp_challenges') diff --git a/app/views/otp_challenges/new.html.erb b/app/views/otp_challenges/new.html.erb index 8247b262..ff7df222 100644 --- a/app/views/otp_challenges/new.html.erb +++ b/app/views/otp_challenges/new.html.erb @@ -6,10 +6,13 @@
<%= form_tag otp_challenge_path, :method => :post, :class => "otp_form" do %> <%= text_field_tag :code, nil, :autofocus => true, - :autocomplete => "one-time-code", :inputmode => "numeric" %> - <%= submit_tag t(".log_in") %> + :autocomplete => "one-time-code", :inputmode => "numeric", + :maxlength => 6, :pattern => "[0-9]{6}", :class => "otp_code" %> + <%= t(".hint") %> + <%= button_tag :type => "submit", :class => "action_button" do %> + <%= icon("shield-check", library: "tabler", "aria-hidden": true) %> <%= t(".log_in") %> + <% end %> <% end %> - <%= t(".hint") %>
-- cgit v1.3