Feature #14275 » 0001-Use-a-variable-to-reference-a-CustomField-object.patch
app/helpers/custom_fields_helper.rb | ||
---|---|---|
79 | 79 | |
80 | 80 |
# Return custom field html tag corresponding to its format |
81 | 81 |
def custom_field_tag(prefix, custom_value) |
82 |
css = custom_value.custom_field.css_classes |
|
82 |
cf = custom_value.custom_field |
|
83 |
css = cf.css_classes |
|
83 | 84 |
data = nil |
84 |
if custom_value.custom_field.full_text_formatting?
|
|
85 |
if cf.full_text_formatting?
|
|
85 | 86 |
css += ' wiki-edit' |
86 | 87 |
data = { |
87 | 88 |
:auto_complete => true |
88 | 89 |
} |
89 | 90 |
end |
90 |
custom_value.custom_field.format.edit_tag(
|
|
91 |
cf.format.edit_tag(
|
|
91 | 92 |
self, |
92 |
custom_field_tag_id(prefix, custom_value.custom_field),
|
|
93 |
custom_field_tag_name(prefix, custom_value.custom_field),
|
|
93 |
custom_field_tag_id(prefix, cf),
|
|
94 |
custom_field_tag_name(prefix, cf),
|
|
94 | 95 |
custom_value, |
95 | 96 |
:class => css, |
96 | 97 |
:data => data) |