Use <p> consistently for form alerts

This commit is contained in:
ricola 2025-12-04 01:46:23 +01:00
parent 0ddb1364bc
commit 4ad1c4cb86
2 changed files with 3 additions and 3 deletions

View file

@ -11,10 +11,10 @@
<% if @user and @user.errors.any? %>
<% @user.errors.each do |error| %>
<% if error.attribute == :email and error.type == :invalid %>
<div class="alert alert-warning mb-4"><%= _("Email is not a valid email address.") %></div>
<p class="alert alert-warning mb-4"><%= _("Email is not a valid email address.") %></p>
<% end %>
<% if error.attribute == :email and error.type == :taken %>
<div class="alert alert-warning mb-4"><%= _("An account already exists for %{email}.") % { email: @user.email } %></div>
<p class="alert alert-warning mb-4"><%= _("An account already exists for %{email}.") % { email: @user.email } %></p>
<% end %>
<% end %>
<% end %>

View file

@ -38,7 +38,7 @@
<div class="card-body">
<h3 class="mb-3"><%= _("Add candidate") %></h3>
<% if @vote.candidates.empty? %>
<div class="alert alert-primary mb-4"><%= _("This vote has no candidates yet. Add a first candidate.") %></div>
<p class="alert alert-primary mb-4"><%= _("This vote has no candidates yet. Add a first candidate.") %></p>
<% end %>
<form action="/votes/<%= @vote.secure_id %>/candidates" method="post">
<div class="mb-3">