<% content_for :page_specific_css do %>
  <%= stylesheet_link_tag "lib/main-forms" %>
<% end %>

<fieldset>
	<div class="input-area">
	  <!-- Language Tabs -->
	  <div class="nav-name"><strong><%= t(:language) %></strong></div>
	  <ul class="nav nav-pills language-nav">
	    <% @site_in_use_locales.each_with_index do |locale, i| %>
	      <li class="<%= 'active' if i == 0 %>">
	        <a data-toggle="tab" href=".<%= locale %>"><%= I18nVariable.from_locale(locale) %></a>
	      </li>
	    <% end %>
	  </ul>

	  <!-- Language -->
  	<div class="tab-content language-area">
			<% @site_in_use_locales.each_with_index do |locale, i| %>
        <div class="<%= locale %> tab-pane fade <%= ( i == 0 ) ? "in active" : '' %>">
	        <!-- Title-->
	        <div class="control-group input-title">
	          <label class="control-label muted"><%= t(:title) %></label>
	          <div class="controls">
	            <h5><%= @page_context.page.title %></h5>
	          </div>
	        </div>
          <!-- Content-->
        	<div class="control-group input-content">
            <label class="control-label muted"><%= t(:content) %></label>
            <div class="controls">
              <div class="textarea">
                <%= f.fields_for :context_translations do |f| %>
	                <%= f.cktext_area locale, rows: 5, class: "input-block-level", :value => (@page_context.context_translations[locale] rescue nil) %>
	              <% end %>
              </div>
            </div>
          </div>
        </div>
      <% end %>
		</div>
	</div>
	<!-- Form Actions -->
	<div class="form-actions">
  	<%= f.submit t(:submit), class: 'btn btn-primary' %>
  	<%#= button_tag t("preview"), id: "button_for_preview", name: "commit", class: 'btn post_preview', type: :button, url: preview_panel_announcement_back_end_bulletins_path %>
  	<%= link_to t(:cancel), get_go_back, class: "btn" %>
  		<%= hidden_field_tag 'page', params[:page] if !params[:page].blank? %>
		<%= hidden_field_tag 'sort', params[:sort] if !params[:sort].blank? %>
		<%= hidden_field_tag 'direction', params[:direction] if !params[:direction].blank? %>
		<%= hidden_field_tag 'sort_options', params[:sort_options] if !params[:sort_options].blank? %>
	</div>

</fieldset>