From 6809b1de833064ea8f536121d4b1504de74d04a3 Mon Sep 17 00:00:00 2001 From: manson Date: Fri, 16 May 2014 17:22:13 +0800 Subject: [PATCH] fix form language tab order --- app/views/admin/faqs/_form.html.erb | 4 ++-- app/views/admin/faqs/_form_qa_file.html.erb | 4 ++-- app/views/admin/faqs/_form_qa_link.html.erb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/admin/faqs/_form.html.erb b/app/views/admin/faqs/_form.html.erb index 5eb1936..25e9c38 100644 --- a/app/views/admin/faqs/_form.html.erb +++ b/app/views/admin/faqs/_form.html.erb @@ -82,14 +82,14 @@
-<% I18n.available_locales.each_with_index do |locale, i| %> +<% @site_in_use_locales.each_with_index do |locale, i| %>
">
<%= f.label :title , t('faq.question'), :class=>"control-label muted" %> diff --git a/app/views/admin/faqs/_form_qa_file.html.erb b/app/views/admin/faqs/_form_qa_file.html.erb index 3262693..8e7c2ea 100644 --- a/app/views/admin/faqs/_form_qa_file.html.erb +++ b/app/views/admin/faqs/_form_qa_file.html.erb @@ -21,7 +21,7 @@ - <% I18n.available_locales.each_with_index do |locale, i| %> + <% @site_in_use_locales.each_with_index do |locale, i| %> <%= locale.to_s %>"> <%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, :class => "input-medium", placeholder: t(:alternative), :value => (form_qa_file.title_translations[locale] rescue nil) %> @@ -31,7 +31,7 @@ - <% I18n.available_locales.each_with_index do |locale, i| %> + <% @site_in_use_locales.each_with_index do |locale, i| %> <%= locale.to_s %>"> <%= f.fields_for :description_translations do |f| %> <%= f.text_field locale, :class => "input-medium", placeholder: t(:description), :value => (form_qa_file.description_translations[locale] rescue nil) %> diff --git a/app/views/admin/faqs/_form_qa_link.html.erb b/app/views/admin/faqs/_form_qa_link.html.erb index 5911052..34c644c 100644 --- a/app/views/admin/faqs/_form_qa_link.html.erb +++ b/app/views/admin/faqs/_form_qa_link.html.erb @@ -3,7 +3,7 @@ <%= f.text_field :url, class: "input-large", placeholder: t(:url) %> - <% I18n.available_locales.each_with_index do |locale, i| %> + <% @site_in_use_locales.each_with_index do |locale, i| %> <%= locale.to_s %>"> <%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, :class => "input-large", placeholder: t(:url_alt), :value => (form_link.title_translations[locale] rescue nil) %>