test
This commit is contained in:
parent
e786ca6155
commit
0f1dfba46c
|
|
@ -330,11 +330,12 @@ module Admin::AsksHelper
|
||||||
default_key = options_hash.keys[default_idx]
|
default_key = options_hash.keys[default_idx]
|
||||||
options_values = options_hash.values
|
options_values = options_hash.values
|
||||||
value ||= {default_key=>default_key}
|
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'
|
next if option['disabled'] == 'true'
|
||||||
checkbox_option = option[I18n.locale]
|
checkbox_option = option[I18n.locale]
|
||||||
"#{check_box_tag("#{field_name}[#{index1}]",index1,value[index1]==index1,{title: checkbox_option})}#{checkbox_option}"
|
"<label class=\"checkbox-inline\" for=\"#{field_name_underscre}_#{index1}\">#{check_box_tag("#{field_name}[#{index1}]",index1,value[index1]==index1,{title: checkbox_option})}#{checkbox_option}"
|
||||||
end.compact.join
|
end.compact.join + "</span>")
|
||||||
end
|
end
|
||||||
when 'file'
|
when 'file'
|
||||||
file_value = value[0] rescue nil
|
file_value = value[0] rescue nil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue