mirror of
https://github.com/redmine/redmine.git
synced 2026-07-06 23:58:39 +02:00
Removed hardcoded formats for right-click edit.
git-svn-id: http://svn.redmine.org/redmine/trunk@12402 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user