forked from fixin.me/fixin.me
Setup wizard: use labeled-form grid for vertical field layout
Replace the fieldset-based layout with the app's standard .labeled-form CSS grid so email, password and retype fields stack vertically (label left, input right) exactly like the existing sign-in and registration forms. Section headings and checkbox rows are given explicit grid-column spans via inline styles so they span the full form width rather than being constrained to the label column. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,38 +1,39 @@
|
|||||||
<%= form_with url: setup_path, method: :post, class: "main-area" do |f| %>
|
<%= form_with url: setup_path, method: :post, class: "labeled-form main-area" do %>
|
||||||
<fieldset>
|
|
||||||
<legend><%= t(".admin_account") %></legend>
|
|
||||||
|
|
||||||
<label for="admin_email"><%= t(".admin_email") %></label>
|
<h3 style="grid-column: 1 / -1; text-align: left; margin: 0;">
|
||||||
<%= email_field_tag :admin_email, params[:admin_email],
|
<%= t(".admin_account") %>
|
||||||
id: "admin_email", required: true, size: 30, autofocus: true,
|
</h3>
|
||||||
autocomplete: "email" %>
|
|
||||||
|
|
||||||
<label for="admin_password"><%= t(".admin_password") %></label>
|
<label for="admin_email"><%= t(".admin_email") %></label>
|
||||||
<%= password_field_tag :admin_password, nil,
|
<%= email_field_tag :admin_email, params[:admin_email],
|
||||||
id: "admin_password", required: true, size: 30,
|
id: "admin_email", required: true, size: 30, autofocus: true,
|
||||||
autocomplete: "new-password" %>
|
autocomplete: "email" %>
|
||||||
|
|
||||||
<label for="admin_password_confirmation"><%= t(".admin_password_confirmation") %></label>
|
<label for="admin_password"><%= t(".admin_password") %></label>
|
||||||
<%= password_field_tag :admin_password_confirmation, nil,
|
<%= password_field_tag :admin_password, nil,
|
||||||
id: "admin_password_confirmation", required: true, size: 30,
|
id: "admin_password", required: true, size: 30,
|
||||||
autocomplete: "off" %>
|
autocomplete: "new-password" %>
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
<label for="admin_password_confirmation"><%= t(".admin_password_confirmation") %></label>
|
||||||
<legend><%= t(".options") %></legend>
|
<%= password_field_tag :admin_password_confirmation, nil,
|
||||||
|
id: "admin_password_confirmation", required: true, size: 30,
|
||||||
|
autocomplete: "off" %>
|
||||||
|
|
||||||
<label for="skip_email_confirmation">
|
<h3 style="grid-column: 1 / -1; text-align: left; margin: 0.5em 0 0 0;">
|
||||||
<%= check_box_tag :skip_email_confirmation, "1",
|
<%= t(".options") %>
|
||||||
params[:skip_email_confirmation] == "1",
|
</h3>
|
||||||
id: "skip_email_confirmation" %>
|
|
||||||
<%= t(".skip_email_confirmation") %>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label for="seed_units">
|
<label for="skip_email_confirmation" style="grid-column: 1 / 3; text-align: left;">
|
||||||
<%= check_box_tag :seed_units, "1", true, id: "seed_units" %>
|
<%= check_box_tag :skip_email_confirmation, "1",
|
||||||
<%= t(".seed_units") %>
|
params[:skip_email_confirmation] == "1",
|
||||||
</label>
|
id: "skip_email_confirmation" %>
|
||||||
</fieldset>
|
<%= t(".skip_email_confirmation") %>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label for="seed_units" style="grid-column: 1 / 3; text-align: left;">
|
||||||
|
<%= check_box_tag :seed_units, "1", true, id: "seed_units" %>
|
||||||
|
<%= t(".seed_units") %>
|
||||||
|
</label>
|
||||||
|
|
||||||
<%= submit_tag t(".submit") %>
|
<%= submit_tag t(".submit") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user