From 862edbf4d5fdb9a88f84bfa1d51ab8cc83896094 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Thu, 13 Aug 2026 01:11:29 +0200 Subject: Give every admin page one horizontal gutter by many views inside. The inner ones are gone nodes#edit's becomes #body_field, which is what #edit_grid places in its full-width row. Rows now reach into the label band themselves rather than depending on a page wrapper to do it. The label column plus its gap equals the escape, so a row's content starts at the gutter on every page; #edit_grid's rows are exempt because the grid already steps back. share one left edge. #new_node's -118px was compensating for that 10px and left the page 7px out once it went. standalone_action_bar was overridden everywhere it appeared. page_translations#edit no longer uses #edit_grid: it has no metadata column, so the two-column template pushed its abstract into the empty half. nodes#edit's lower action bar was inside #edit_grid, so it was a grid item inheriting the escape and sat 125px left of the form above it. --- app/views/users/edit.html.erb | 106 ++++++++++++++++++++++++------------------ 1 file changed, 61 insertions(+), 45 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 1763394d..8a5900ce 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -8,67 +8,83 @@ <% end %> <%= form_for @user do |f| %> -
<%= t("users.labels.login") %>
-
<%= f.text_field :login, :autocomplete => "username" %>
+
+
<%= t("users.labels.login") %>
+
<%= f.text_field :login, :autocomplete => "username" %>
+
-
<%= t("users.labels.email") %>
-
<%= f.text_field :email %>
+
+
<%= t("users.labels.email") %>
+
<%= f.text_field :email %>
+
-
<%= t("users.labels.password") %>
-
<%= f.password_field :password, :autocomplete => "new-password" %>
+
+
<%= t("users.labels.password") %>
+
<%= f.password_field :password, :autocomplete => "new-password" %>
+
-
<%= t("users.labels.confirm") %>
-
<%= f.password_field :password_confirmation, :autocomplete => "new-password" %>
+
+
<%= t("users.labels.confirm") %>
+
<%= f.password_field :password_confirmation, :autocomplete => "new-password" %>
+
<% if current_user.is_admin? %> -
<%= t("users.labels.roles") %>
-
- <% User::ROLES.each do |role| %> - - <% end %> - <%= hidden_field_tag "user[roles][]", "" %> +
+
<%= t("users.labels.roles") %>
+
+ <% User::ROLES.each do |role| %> + + <% end %> + <%= hidden_field_tag "user[roles][]", "" %> +
<% end %> -
-
<%= submit_tag t(".update") %>
+
+
+
<%= submit_tag t(".update") %>
+
<% end %> <% if @user == current_user %> -
<%= t(".second_factor") %>
-
- <% if current_user.otp_enrolled? %> -

<%= 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" %> - <%= button_tag :type => "submit", :class => "action_button" do %> - <%= icon("shield-off", library: "tabler", "aria-hidden": true) %> <%= t(".disable_second_factor") %> +
+
<%= t(".second_factor") %>
+
+ <% if current_user.otp_enrolled? %> +

<%= 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" %> + <%= button_tag :type => "submit", :class => "action_button" do %> + <%= icon("shield-off", library: "tabler", "aria-hidden": true) %> <%= t(".disable_second_factor") %> + <% end %> <% end %> - <% end %> - <% else %> -

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

- <%= form_tag otp_enrollment_path, :method => :post, :class => "otp_form" do %> - <%= password_field_tag :current_password, nil, :placeholder => t(".current_password"), :autocomplete => "current-password"%> - <%= button_tag :type => "submit", :class => "action_button" do %> - <%= icon("shield-lock", library: "tabler", "aria-hidden": true) %> <%= t(".enable_second_factor") %> + <% else %> +

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

+ <%= form_tag otp_enrollment_path, :method => :post, :class => "otp_form" do %> + <%= password_field_tag :current_password, nil, :placeholder => t(".current_password"), :autocomplete => "current-password"%> + <%= button_tag :type => "submit", :class => "action_button" do %> + <%= icon("shield-lock", library: "tabler", "aria-hidden": true) %> <%= t(".enable_second_factor") %> + <% end %> <% end %> <% end %> - <% end %> +
<% elsif current_user.is_admin? && @user.otp_enrolled? %> -
<%= t(".second_factor") %>
-
- <%= t(".enabled") %> - <%= button_to t(".reset_second_factor"), reset_otp_user_path(@user), :method => :put, - :form_class => "button_to destructive", - :form => { :data => { :confirm => t(".reset_confirm", :login => @user.login) } } %> +
+
<%= t(".second_factor") %>
+
+ <%= t(".enabled") %> + <%= button_to t(".reset_second_factor"), reset_otp_user_path(@user), :method => :put, + :form_class => "button_to destructive", + :form => { :data => { :confirm => t(".reset_confirm", :login => @user.login) } } %> +
<% end %>
-- cgit v1.3