From e7302c8f34ffad13fc8e43a6d4e6412796c25419 Mon Sep 17 00:00:00 2001 From: chiu Date: Sun, 22 Mar 2020 12:41:00 +0800 Subject: [PATCH] fix showing error --- app/helpers/admin/asks_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/admin/asks_helper.rb b/app/helpers/admin/asks_helper.rb index c735dd1..fb2c483 100644 --- a/app/helpers/admin/asks_helper.rb +++ b/app/helpers/admin/asks_helper.rb @@ -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 = "
#{multiple_lang_tag(k,'text_field','prompt_word',v['prompt_word'],{placeholder: t('ask.prompt_word')})}
" require_ask_tag = "
#{t('ask.required')}:  #{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')}
"