Fix bug select options blank

This commit is contained in:
Xavier J 2016-10-03 12:43:05 +02:00
parent 5f8c2549c1
commit 60ff939089

View file

@ -1,13 +1,14 @@
%select{ name:"champs['#{champ.id}']",
id: "champs_#{champ.id}" }
- champ.drop_down_list.options.each do |option|
- if (option=~ /^--.*--$/).nil?
- if champ.value == option
%option{selected:''}
- unless champ.drop_down_list.blank?
- champ.drop_down_list.options.each do |option|
- if (option=~ /^--.*--$/).nil?
- if champ.value == option
%option{selected:''}
= option
- else
%option
= option
-else
%option{disabled:''}
= option
- else
%option
= option
-else
%option{disabled:''}
= option