fix showing error

This commit is contained in:
chiu 2020-03-22 12:41:00 +08:00
parent e1e764627e
commit e7302c8f34
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ module Admin::AsksHelper
hidden_style = value['disabled'] == 'true' ? {style: 'display:none;'} : {}
"#{multiple_lang_tag(k,'text_field',"options][#{key}",value,{placeholder: t('ask.option_name')},tmp,hidden_style)}"
end.join
active_class = Array(v['options']).count !=0 ? ' active' : ''
active_class = ['select','radio_button','checkbox'].include?(v['type']) ? ' active' : ''
active_prompt_class = ['date','radio_button','checkbox'].exclude?(v['type']) ? ' active' : ''
multi_lang_prompt_tag = "<div class=\"prompt_word#{active_prompt_class}\">#{multiple_lang_tag(k,'text_field','prompt_word',v['prompt_word'],{placeholder: t('ask.prompt_word')})}</div>"
require_ask_tag = "<div>#{t('ask.required')}:&nbsp;&nbsp;#{field_radio_button_tag(k,'required','true',v['required']=='true')}#{t('ask.yes')}#{field_radio_button_tag(k,'required','false',v['required']!='true')}#{t('ask.no')}</div>"