<% values ||=[]%> <%= content_tag :div,:class=>"control-group" do%> <label class="control-label muted" for=""><%= (defined? label_ext) ? label_ext : t(:placeholder) %></label> <div class="controls"> <div class="input-append"> <div class="tab-content"> <% @site_valid_locales.each do |locale| %> <% active = (locale == @site_valid_locales.first ? "active in" : "'") %> <%= content_tag :div,:class=>"tab-pane fade #{active}",:id=>"#{name_to_id(field_name)}_#{locale}" do%> <% locale_value = values[locale.to_s] rescue nil%> <%= text_field(field_name, locale,:value=>locale_value,:placeholder=>I18nVariable.from_locale(locale),:data=>{:type=>"lang_#{locale}"}) %> <% end %> <% end %> </div> <div class="btn-group" data-toggle="buttons-radio"> <% @site_valid_locales.each do |locale| %> <% active = (locale == @site_valid_locales.first ? "active" : "") %> <%= link_to I18nVariable.from_locale(locale),"##{name_to_id(field_name)}_#{locale}",:class=>"btn #{active}",:data=>{:toggle=>"tab"}%> <% end %> </div> </div> </div> <% end %>