Reorder as in form

This commit is contained in:
ricola 2025-12-04 02:52:25 +01:00
parent b2e76f4363
commit ecbf830e81

View file

@ -1,13 +1,5 @@
<h1 class="mb-5"><%= _("Create account") %></h1> <h1 class="mb-5"><%= _("Create account") %></h1>
<% if @errors %>
<% @errors.each do |error| %>
<% if error.attribute == :password and error.type == :blank %>
<p class="alert alert-warning mb-4"><%= _("Enter a password.") %></p>
<% end %>
<% end %>
<% end %>
<% if @user and @user.errors.any? %> <% if @user and @user.errors.any? %>
<% @user.errors.each do |error| %> <% @user.errors.each do |error| %>
<% if error.attribute == :email and error.type == :invalid %> <% if error.attribute == :email and error.type == :invalid %>
@ -19,6 +11,14 @@
<% end %> <% end %>
<% end %> <% end %>
<% if @errors %>
<% @errors.each do |error| %>
<% if error.attribute == :password and error.type == :blank %>
<p class="alert alert-warning mb-4"><%= _("Enter a password.") %></p>
<% end %>
<% end %>
<% end %>
<form action="/signup" method="post"> <form action="/signup" method="post">
<div class="mb-3"> <div class="mb-3">
<label for="email" class="form-label"><%= _("Email") %></label> <label for="email" class="form-label"><%= _("Email") %></label>