<div class="modal-window" id="categories">
  <div class="modal-header">
    <h3><%= t("gallery.add_album") %></h3>
  </div>
  <%= form_for @album, :url => {:action => "create"}, :remote => true do |f| %>
  <div class="modal-body add-album">
       <div> <%= f.select(:gallery_category_id, GalleryCategory.all.collect {|p| [ p.name, p.id ] },{:prompt => t("gallery.select_category")},:class => "validate input-xlarge") %> </div>
    <ul class="nav nav-tabs">
      <% @site_valid_locales.each_with_index do |locale, i| %>
        <li class=<%= ( i == 0 ) ? "active" : "" %>><a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a></li>
      <% end %>
    </ul>
    <div class="tab_content form-horizontal">
        <%= f.fields_for :name_translations do |name| %>
            <% @site_valid_locales.each_with_index do |locale, i| %>
             <% if i == 0 %>
                <div class="<%= locale %> fade tab-pane in active">
             <% else %>
                <div class="<%= locale %> fade tab-pane" >
             <% end %>
               <p class="control-group">
                <%= label_tag(locale, t("gallery.album_name")) %>
                <%= name.text_field locale, :class => "validate input-xlarge" %>
              </p>
            </div>
             <% end %> 
        <% end %>
         <%= f.fields_for :description_translations do |desc| %>
            <% @site_valid_locales.each_with_index do |locale, i| %>
             <% if i == 0 %>
                <div class="<%= locale %> fade tab-pane in active">
             <% else %>
                <div class="<%= locale %> fade tab-pane" >
             <% end %>
               <p class="control-group">
                <%= label_tag(locale, t("gallery.album_desc")) %>
                <%= desc.text_field locale, :class => "input-xlarge" %>
              </p>
            </div>
             <% end %> 
        <% end %>
    </div>
  </div>
  <div class="modal-footer">
    <a href="#" class="btn" data-dismiss="modal" id="album_name_close_btn" onclick="return false;"><%= t("gallery.close") %></a>
    <!-- <a href="#" class="btn btn-primary" id="album_name_save_btn" onclick="return false;"><%#= t("gallery.save_changes") %></a> -->
     <%= f.submit t("gallery.save"), :class=> "btn btn-primary bt-form-save" %>
  </div>
<% end %>
</div>

