<% # encoding: utf-8 %>

		<%= form_for @bulletin_file, :url => @file_url, :html => {:id => 'ajaxForm', :multipart => true} do |f| %>
        
            <div class="modal-header">
                <a class="close" data-dismiss="modal">×</a>
                <h3><%= (@bulletin_file.new_record? ? t(:add) : t(:edit)) %></h3>
            </div>
            <div class="modal-body form-horizontal">
				<div class="control-group">
					<div class="controls">
					<%= f.file_field :file %>
					</div>
				</div>
				
				<%= f.fields_for :title_translations do |f| %>
				  <% @site_valid_locales.each do |locale| %>
					<div class="control-group">
						<label for="file-<%= locale %>" class="control-label"><%= t(:name) %> <%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></label>
						<div class="controls">
						<%= f.text_field locale, :id => "file-#{locale}", :class => "input-xlarge", :value => (@bulletin_file.title_translations[locale] rescue nil)  %>
						</div>
					</div>
				  <% end %>
				<% end %>	
				
				<%= f.fields_for :description_translations do |f| %>
				  <% @site_valid_locales.each do |locale| %>
					<div class="control-group">
						<label for="file-<%= locale %>" class="control-label"><%= t(:description) %> <%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></label>
						<div class="controls">
						<%= f.text_field locale, :id => "file-#{locale}", :class => "input-xlarge", :value => (@bulletin_file.description_translations[locale] rescue nil) %>
						</div>
					</div>
				  <% end %>
				<% end %>
				
            </div>
			
            <div class="modal-footer">
							<%= hidden_field_tag 'bulletin_file[bulletin_id]', @bulletin_file.bulletin_id %>
        			<a class="btn btn-primary" id='ajax_form_submit'><%= t('submit')%></a>
               <a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
				
            </div>

		
		<% end %>
		

 		