From 50ca5e40f461290a2db7452b95f80dd3188dba1d Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 24 Jul 2026 18:04:56 +0200 Subject: Rename layout classes to what they actually do --- app/views/users/edit.html.erb | 34 +++++++++++++++++----------------- app/views/users/new.html.erb | 26 +++++++++++++------------- app/views/users/show.html.erb | 22 +++++++++++----------- 3 files changed, 41 insertions(+), 41 deletions(-) (limited to 'app/views/users') diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 8adad789..a8994701 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -6,34 +6,34 @@ <% end %> -
+
<%= form_for @user do |f| %>
-
Login
-
<%= f.text_field :login, :autocomplete => "username" %>
+
Login
+
<%= f.text_field :login, :autocomplete => "username" %>
-
E-Mail
-
<%= f.text_field :email %>
+
E-Mail
+
<%= f.text_field :email %>
-
Password
-
<%= f.password_field :password, :autocomplete => "new-password" %>
+
Password
+
<%= f.password_field :password, :autocomplete => "new-password" %>
-
Confirm
-
<%= f.password_field :password_confirmation, :autocomplete => "new-password" %>
+
Confirm
+
<%= f.password_field :password_confirmation, :autocomplete => "new-password" %>
<% if current_user.admin? %> -
Admin?
-
<%= f.check_box :admin %>
+
Admin?
+
<%= f.check_box :admin %>
<% end %> -
-
<%= f.submit "Update" %>
+
+
<%= f.submit "Update" %>
<% end %>
<% if @user == current_user %> -
Second factor
-
+
Second factor
+
<% if current_user.otp_enrolled? %>

Enabled.

<%= form_tag otp_enrollment_path, :method => :delete, :class => "otp_form" do %> @@ -57,8 +57,8 @@ <% end %>
<% elsif current_user.admin? && @user.otp_enrolled? %> -
Second factor
-
+
Second factor
+
Enabled. <%= button_to "Reset second factor", reset_otp_user_path(@user), :method => :put, :form_class => "button_to destructive", diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index ce38fdf9..8ae993c5 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -6,26 +6,26 @@
<% end %> -
+
<%= form_for @user do |f| %>
-
Login
-
<%= f.text_field :login %>
+
Login
+
<%= f.text_field :login %>
-
E-Mail
-
<%= f.text_field :email %>
+
E-Mail
+
<%= f.text_field :email %>
-
Password
-
<%= f.password_field :password %>
+
Password
+
<%= f.password_field :password %>
-
Confirm
-
<%= f.password_field :password_confirmation %>
+
Confirm
+
<%= f.password_field :password_confirmation %>
-
Admin?
-
<%= f.check_box :admin %>
+
Admin?
+
<%= f.check_box :admin %>
-
-
<%= f.submit "Create" %>
+
+
<%= f.submit "Create" %>
<% end %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 70881dbd..08eb52ec 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,11 +1,11 @@ -
+

<%= @user.login %>

-
Actions
-
-
-
+
Actions
+
+
+
<%= link_to edit_user_path(@user), class: 'action_button' do %> <%= icon("edit", library: "tabler", "aria-hidden": true) %> Edit <% end %> @@ -13,13 +13,13 @@
-
Login
-
<%= @user.login %>
+
Login
+
<%= @user.login %>
-
E-Mail
-
<%= @user.email %>
+
E-Mail
+
<%= @user.email %>
-
Admin?
-
<%= @user.admin ? "yes" : "no" %>
+
Admin?
+
<%= @user.admin ? "yes" : "no" %>
-- cgit v1.3