From 335a16e4fd28ce464fb45e79fac456b5d6bf88fa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 27 May 2017 08:49:08 +0000 Subject: Cusotom field label should not be associated to the first input (#25760). git-svn-id: http://svn.redmine.org/redmine/trunk@16574 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/field_format.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index c1ce0055c..65c61eb36 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -620,13 +620,11 @@ module Redmine opts.each do |label, value| value ||= label checked = (custom_value.value.is_a?(Array) && custom_value.value.include?(value)) || custom_value.value.to_s == value - tag = view.send(tag_method, tag_name, value, checked, :id => tag_id) - # set the id on the first tag only - tag_id = nil + tag = view.send(tag_method, tag_name, value, checked, :id => nil) s << view.content_tag('label', tag + ' ' + label) end if custom_value.custom_field.multiple? - s << view.hidden_field_tag(tag_name, '') + s << view.hidden_field_tag(tag_name, '', :id => nil) end css = "#{options[:class]} check_box_group" view.content_tag('span', s, options.merge(:class => css)) -- cgit v1.2.3