diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-09-02 13:33:23 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-09-02 13:33:23 +0000 |
commit | 552d99d664b6c67d021e0b04fb5c6bde3a23c8ce (patch) | |
tree | c765cbb35f725f86590aabd29cb042579cca4b46 /redmine/app/helpers/custom_fields_helper.rb | |
parent | 54aeec7b5fcf61e9fe27aafe4e72cf5bbd085ee2 (diff) | |
download | redmine-552d99d664b6c67d021e0b04fb5c6bde3a23c8ce.tar.gz redmine-552d99d664b6c67d021e0b04fb5c6bde3a23c8ce.zip |
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
Diffstat (limited to 'redmine/app/helpers/custom_fields_helper.rb')
-rw-r--r-- | redmine/app/helpers/custom_fields_helper.rb | 11 |
1 files changed, 3 insertions, 8 deletions
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? ? " <span class=\"required\">*</span>" : ""),
- :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) + "<br />" + 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
|