<% # encoding: utf-8 %>

		<%= form_for(@bulletin_file, :remote => true, :url => @file_url) do |f| %>
        
            <div class="modal-header">
                <a class="close" data-dismiss="modal">×</a>
                <h3><%= (@bulletin_file.new_record? ? 'Add File' : 'Edit File') %></h3>
            </div>
            <div class="modal-body form-horizontal">
				<div class="control-group">
					<div class="controls">
					<%= f.file_field :file %>
					</div>
				</div>
				
				<%= f.fields_for :filetitle, (@bulletin_file.new_record? ? @bulletin_file.build_filetitle : @bulletin_file.filetitle ) do |f| %>
				  <% @site_valid_locales.each do |locale| %>
					<div class="control-group">
						<label for="file-<%= locale %>" class="control-label">Name <%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></label>
						<div class="controls">
						<%= f.text_field locale, :id => "file-#{locale}", :class => "input-xlarge" %>
						</div>
					</div>
				  <% end %>
				<% end %>	
				
				<%= f.fields_for :description, (@bulletin_file.new_record? ? @bulletin_file.build_description : @bulletin_file.description ) do |f| %>
				  <% @site_valid_locales.each do |locale| %>
					<div class="control-group">
						<label for="file-<%= locale %>" class="control-label">Description <%= I18nVariable.first(:conditions => {:key => locale})[I18n.locale] %></label>
						<div class="controls">
						<%= f.text_field locale, :id => "file-#{locale}", :class => "input-xlarge" %>
						</div>
					</div>
				  <% end %>
				<% end %>
				
            </div>
			
            <div class="modal-footer">
				<%= hidden_field_tag 'bulletin_file[bulletin_id]', @bulletin_file.bulletin_id %>
				<%= f.submit t('submit'), :class=>'btn btn-primary' %>
                <a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
				
            </div>

		
		<% end %>
		

 		