update form error styles

This commit is contained in:
Alex Turchyn
2023-06-02 01:23:56 +03:00
parent cdb1fd4c9f
commit 4905b13f25
4 changed files with 23 additions and 12 deletions
@@ -1,14 +1,18 @@
<% if resource.errors.any? %>
<div id="error_explanation" data-turbo-cache="false">
<h2>
<%= I18n.t('errors.messages.not_saved',
<div class="alert">
<div>
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
<div>
<h3 class="font-bold">
<%= I18n.t('errors.messages.not_saved',
count: resource.errors.count,
resource: resource.class.model_name.human.downcase) %>
</h2>
<ul>
<% resource.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
resource: resource.class.model_name.human.downcase) %></h3>
<% resource.errors.full_messages.each do |message| %>
<p class="text-sm"><%= message %></p>
<% end %>
</div>
</div>
</div>
</div>
<% end %>
+4
View File
@@ -0,0 +1,4 @@
<% 'input-error' %>
<span class="label-text-alt text-red-400">
<%= message %>
</span>
@@ -5,13 +5,12 @@
<div>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
<div>
<h3 class="font-bold"> Store all files on disk</h3>
<h3 class="font-bold">Store all files on disk</h3>
<p class="text-gray-700">
No configs are needed but make sure your disk is persistent
<br>
<i>(not suitable for Heroku and other PaaS)</i>
</p>
</div>
</div>
</div>