mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
fix styling of error messages
This commit is contained in:
parent
ed3cbf991c
commit
5454ba385f
4 changed files with 7 additions and 11 deletions
|
|
@ -1249,7 +1249,7 @@ table.export_table {
|
|||
/* Submit button styling from ParticleTree
|
||||
http://particletree.com/features/rediscovering-the-button-element/ */
|
||||
|
||||
.widgets a, .widgets button{
|
||||
.widgets a, .widgets button {
|
||||
display:block;
|
||||
float: left;
|
||||
margin:0px 7px 0 0;
|
||||
|
|
|
|||
|
|
@ -252,8 +252,10 @@ module ApplicationHelper
|
|||
|
||||
def get_list_of_error_messages_for(model)
|
||||
if model.errors.any?
|
||||
content_tag(:ul) do
|
||||
model.errors.full_messages.collect { |msg| concat(content_tag(:li, msg)) }
|
||||
content_tag(:div, {:id=>"errorExplanation"}) do
|
||||
content_tag(:ul) do
|
||||
model.errors.full_messages.collect { |msg| concat(content_tag(:li, msg)) }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ class Todo < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def hidden?
|
||||
return self.state == 'project_hidden' || ( self.context.hidden? && (self.state == 'active' || self.state == 'deferred'))
|
||||
return self.project_hidden? || ( self.context.hidden? && (self.active? || self.deferred?))
|
||||
end
|
||||
|
||||
def update_state_from_project
|
||||
|
|
|
|||
|
|
@ -7,13 +7,7 @@
|
|||
<input type="hidden" id="new_todo_starred" name="new_todo_starred" value="false" />
|
||||
|
||||
<div id="error_status">
|
||||
<% if todo.errors.any? -%>
|
||||
<ul>
|
||||
<% todo.errors.full_messages.each do |msg| %>
|
||||
<li><%= msg %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end -%>
|
||||
<%= get_list_of_error_messages_for(todo) %>
|
||||
</div>
|
||||
|
||||
<label for="todo_description" style="float:left"><%= Todo.human_attribute_name('description') %></label>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue