From 552d99d664b6c67d021e0b04fb5c6bde3a23c8ce Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 2 Sep 2006 13:33:23 +0000 Subject: tables and forms redesign, added form builder for several views git-svn-id: http://redmine.rubyforge.org/svn/trunk@21 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- redmine/app/helpers/custom_fields_helper.rb | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'redmine/app/helpers/custom_fields_helper.rb') diff --git a/redmine/app/helpers/custom_fields_helper.rb b/redmine/app/helpers/custom_fields_helper.rb index bc5a15e9a..eb4d47a83 100644 --- a/redmine/app/helpers/custom_fields_helper.rb +++ b/redmine/app/helpers/custom_fields_helper.rb @@ -39,18 +39,13 @@ module CustomFieldsHelper def custom_field_label_tag(custom_value) content_tag "label", custom_value.custom_field.name + (custom_value.custom_field.is_required? ? " *" : ""), - :for => "custom_fields_#{custom_value.custom_field.id}" + :for => "custom_fields_#{custom_value.custom_field.id}", + :class => (custom_value.errors.empty? ? nil : "error" ) end # Return custom field tag with its label tag def custom_field_tag_with_label(custom_value) - case custom_value.custom_field.field_format - when "bool" - # label is displayed inline after the checkbox - custom_field_tag(custom_value) + " " + custom_field_label_tag(custom_value) - else - custom_field_label_tag(custom_value) + "
" + custom_field_tag(custom_value) - end + custom_field_label_tag(custom_value) + custom_field_tag(custom_value) end # Return a string used to display a custom value -- cgit v1.2.3