1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

Use a variable to reference a CustomField object (#14275).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@21459 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2022-03-17 11:50:44 +00:00
parent 9462fb4e2c
commit e1ae7f5c84

View File

@ -79,18 +79,19 @@ module CustomFieldsHelper
# Return custom field html tag corresponding to its format
def custom_field_tag(prefix, custom_value)
css = custom_value.custom_field.css_classes
cf = custom_value.custom_field
css = cf.css_classes
data = nil
if custom_value.custom_field.full_text_formatting?
if cf.full_text_formatting?
css += ' wiki-edit'
data = {
:auto_complete => true
}
end
custom_value.custom_field.format.edit_tag(
cf.format.edit_tag(
self,
custom_field_tag_id(prefix, custom_value.custom_field),
custom_field_tag_name(prefix, custom_value.custom_field),
custom_field_tag_id(prefix, cf),
custom_field_tag_name(prefix, cf),
custom_value,
:class => css,
:data => data)