diff --git a/app/assets/stylesheets/ask/ask.css b/app/assets/stylesheets/ask/ask.css index f468a9c..dd0d2b5 100644 --- a/app/assets/stylesheets/ask/ask.css +++ b/app/assets/stylesheets/ask/ask.css @@ -56,5 +56,5 @@ /*驗證碼*/ .text-error { color: #b94a48; - font-size: 10px; + font-size: 0.83em; } \ No newline at end of file diff --git a/app/helpers/admin/asks_helper.rb b/app/helpers/admin/asks_helper.rb index 40fc394..78e2572 100644 --- a/app/helpers/admin/asks_helper.rb +++ b/app/helpers/admin/asks_helper.rb @@ -44,7 +44,7 @@ module Admin::AsksHelper def create_lang_panel_for_ask(field) tmp2 = content_tag(:div,:class => 'btn-group', :data=>{:toggle=>"buttons-radio"}) do I18n.available_locales.collect do |key| - link_entry_ary = ["##{field}","_#{key}"] + link_entry_ary = ["##{field}", "_#{key}", @field_postfix] link_entry = link_entry_ary.join link_to(I18n.t(key),link_entry,:data=>{:toggle=>"tab"},:class=>"btn #{(key == I18n.locale ? "active" : nil)}",:for=>key) end.join.html_safe @@ -56,9 +56,14 @@ module Admin::AsksHelper else all_field = (get_input_name_for_ask + "[#{field}][parant]").gsub(/[\[@]/,'_').gsub(/\]/,'') end + if @field_postfix.nil? + @field_postfix = 1 + else + @field_postfix += 1 + end tmp = (I18n.available_locales.collect do |locale| active_flag = ((locale == I18n.locale) ? ' active' : '') - content_tag(:div,:class => "tab-content#{active_flag}",:id=>"#{all_field}_#{locale}") do + content_tag(:div,:class => "tab-content#{active_flag}",:id=>"#{all_field}_#{locale}#{@field_postfix}") do value_locale = value[locale.to_s] rescue nil "