custom_field = custom_value.custom_field
field_name = "#{name}[custom_field_values][#{custom_field.id}]"
field_id = "#{name}_custom_field_values_#{custom_field.id}"
-
- case custom_field.field_format
+
+ field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
+ case field_format.edit_as
when "date"
text_field_tag(field_name, custom_value.value, :id => field_id, :size => 10) +
calendar_for(field_id)
def custom_field_tag_for_bulk_edit(name, custom_field)
field_name = "#{name}[custom_field_values][#{custom_field.id}]"
field_id = "#{name}_custom_field_values_#{custom_field.id}"
- case custom_field.field_format
+ field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
+ case field_format.edit_as
when "date"
text_field_tag(field_name, '', :id => field_id, :size => 10) +
calendar_for(field_id)