diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-12-14 08:57:30 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-12-14 08:57:30 +0000 |
commit | ebb8e8612254b4e5bb4b8121530064cd140a1ece (patch) | |
tree | b98172741609b838a982782e450b679566f96c27 /lib/redmine/field_format.rb | |
parent | 32f782f1aad8f57b3afd1be300bf7295ac474ac4 (diff) | |
download | redmine-ebb8e8612254b4e5bb4b8121530064cd140a1ece.tar.gz redmine-ebb8e8612254b4e5bb4b8121530064cd140a1ece.zip |
Removed hardcoded formats for right-click edit.
git-svn-id: http://svn.redmine.org/redmine/trunk@12402 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/field_format.rb')
-rw-r--r-- | lib/redmine/field_format.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index 5ff11939a..f0f83cccb 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -118,7 +118,7 @@ module Redmine end def possible_values_options(custom_field, object=nil) - custom_field.possible_values + [] end # Returns the validation errors for custom_field @@ -476,7 +476,7 @@ module Redmine self.form_partial = 'custom_fields/formats/list' def possible_custom_value_options(custom_value) - options = super + options = possible_values_options(custom_value.custom_field) missing = [custom_value.value].flatten.reject(&:blank?) - options if missing.any? options += missing @@ -484,6 +484,10 @@ module Redmine options end + def possible_values_options(custom_field, object=nil) + custom_field.possible_values + end + def validate_custom_field(custom_field) errors = [] errors << [:possible_values, :blank] if custom_field.possible_values.blank? |