Fix missing title attribute for checkbox.
This commit is contained in:
parent
9d01096e13
commit
185ab8f6d5
|
|
@ -330,10 +330,12 @@ module Admin::AsksHelper
|
|||
default_key = options_hash.keys[default_idx]
|
||||
options_values = options_hash.values
|
||||
value ||= {default_key=>default_key}
|
||||
readonly ? value.collect{|k1,v1| options_values[v1.to_i][I18n.locale]}.join(', ') : options_hash.collect do |index1,option|
|
||||
field_name_underscre = field_name.gsub(/(\[|\])/,'_').gsub('__','_').chomp('_')
|
||||
readonly ? value.collect{|k1,v1| options_values[v1.to_i][I18n.locale]}.join(', ') : ("<span class=\"checkbox\">" + options_hash.collect do |index1,option|
|
||||
next if option['disabled'] == 'true'
|
||||
"#{check_box_tag("#{field_name}[#{index1}]",index1,value[index1]==index1)}#{option[I18n.locale]}"
|
||||
end.compact.join
|
||||
checkbox_option = option[I18n.locale]
|
||||
"<label class=\"checkbox-inline\" for=\"#{field_name_underscre}_#{index1}\">#{check_box_tag("#{field_name}[#{index1}]",index1,value[index1]==index1,{title: checkbox_option})}#{checkbox_option}</label>"
|
||||
end.compact.join + "</span>")
|
||||
end
|
||||
when 'file'
|
||||
file_value = value[0] rescue nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue