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/users/edit.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/views/users/edit.html.erb') diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 2cf5a07c..14e19e39 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -59,8 +59,9 @@

<%= t(".enabled") %>

<%= form_tag otp_enrollment_path, :method => :delete, :class => "otp_form" do %> <%= password_field_tag :current_password, nil, :placeholder => t(".current_password"), :autocomplete => "current-password" %> - <%= text_field_tag :code, nil, :placeholder => t(".current_code"), - :autocomplete => "one-time-code", :inputmode => "numeric" %> + <%= text_field_tag :code, nil, :autocomplete => "one-time-code", :inputmode => "numeric", + :maxlength => 6, :pattern => "[0-9]{6}", :class => "otp_code" %> + <%= t(".reset_hint") %> <%= button_tag :type => "submit", :class => "action_button" do %> <%= icon("shield-off", library: "tabler", "aria-hidden": true) %> <%= t(".disable_second_factor") %> <% end %> -- cgit v1.3