<%= form_for @category, :url => panel_gallery_back_end_gallery_category_path(@category), :remote => true do |f| %>
  <%= f.fields_for :name_translations do |name| %>
    <% @site_valid_locales.each do |locale| %>
      <%= label_tag(locale,t("gallery.new_category")+"["+I18nVariable.from_locale(locale)+"]") %>
      <%= name.text_field locale, :value =>(@category.name_translations[locale]) %> 
    <% end %>
  <% end %>
<%= f.submit t("gallery.save"), :class=> "btn btn-primary temp_save_btn" %>
<a href="#" class="btn btn-primary" id="temp_cancel_btn" onclick="return false;"><%= I18n.t("gallery.cancel") %></a>
<% end %> 