Fix missing title attribute for checkbox.

This commit is contained in:
邱博亞 2024-07-18 09:31:53 +08:00
parent 9d01096e13
commit e786ca6155
1 changed files with 2 additions and 1 deletions

View File

@ -332,7 +332,8 @@ module Admin::AsksHelper
value ||= {default_key=>default_key}
readonly ? value.collect{|k1,v1| options_values[v1.to_i][I18n.locale]}.join(', ') : options_hash.collect do |index1,option|
next if option['disabled'] == 'true'
"#{check_box_tag("#{field_name}[#{index1}]",index1,value[index1]==index1)}#{option[I18n.locale]}"
checkbox_option = option[I18n.locale]
"#{check_box_tag("#{field_name}[#{index1}]",index1,value[index1]==index1,{title: checkbox_option})}#{checkbox_option}"
end.compact.join
end
when 'file'