mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-22 18:20:12 +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
|
/* Submit button styling from ParticleTree
|
||||||
http://particletree.com/features/rediscovering-the-button-element/ */
|
http://particletree.com/features/rediscovering-the-button-element/ */
|
||||||
|
|
||||||
.widgets a, .widgets button{
|
.widgets a, .widgets button {
|
||||||
display:block;
|
display:block;
|
||||||
float: left;
|
float: left;
|
||||||
margin:0px 7px 0 0;
|
margin:0px 7px 0 0;
|
||||||
|
|
|
||||||
|
|
@ -252,8 +252,10 @@ module ApplicationHelper
|
||||||
|
|
||||||
def get_list_of_error_messages_for(model)
|
def get_list_of_error_messages_for(model)
|
||||||
if model.errors.any?
|
if model.errors.any?
|
||||||
content_tag(:ul) do
|
content_tag(:div, {:id=>"errorExplanation"}) do
|
||||||
model.errors.full_messages.collect { |msg| concat(content_tag(:li, msg)) }
|
content_tag(:ul) do
|
||||||
|
model.errors.full_messages.collect { |msg| concat(content_tag(:li, msg)) }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ class Todo < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def hidden?
|
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
|
end
|
||||||
|
|
||||||
def update_state_from_project
|
def update_state_from_project
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,7 @@
|
||||||
<input type="hidden" id="new_todo_starred" name="new_todo_starred" value="false" />
|
<input type="hidden" id="new_todo_starred" name="new_todo_starred" value="false" />
|
||||||
|
|
||||||
<div id="error_status">
|
<div id="error_status">
|
||||||
<% if todo.errors.any? -%>
|
<%= get_list_of_error_messages_for(todo) %>
|
||||||
<ul>
|
|
||||||
<% todo.errors.full_messages.each do |msg| %>
|
|
||||||
<li><%= msg %></li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
<% end -%>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label for="todo_description" style="float:left"><%= Todo.human_attribute_name('description') %></label>
|
<label for="todo_description" style="float:left"><%= Todo.human_attribute_name('description') %></label>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue