<% # encoding: utf-8 %>

<%= form_for(@bulletin_link, :remote => true, :url => @link_url) do |f| %>
    
	<div class="modal-header">
	  <a class="close" data-dismiss="modal">×</a>
	  <h3><%= (@bulletin_link.new_record? ? 'Add Link' : 'Edit Link') %></h3>
	</div>
	<div class="modal-body form-horizontal">
	  <div class="control-group">
	    <label for="http" class="control-label">URL</label>
	    <div class="controls">
			<%= f.text_field :url %>
	  </div>
	</div>

	<%= f.fields_for :title_translations do |f| %>
		<% @site_valid_locales.each do |locale| %>
			<div class="control-group">
				<%= label_tag "link-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
				<div class="controls">
					<%#= f.text_field locale, :class => 'input-xxlarge' %>
					<%= f.text_field locale, :class => 'control-label', :value => (@bulletin_link.title_translations[locale] rescue nil) %>
				</div>
			</div>
		<% end %>
	<% end %>
	</div>
	<div class="modal-footer">
		<%= hidden_field_tag 'bulletin_link[bulletin_id]', @bulletin_link.bulletin_id %>
		<%= f.submit t('submit'), :class=>'btn btn-primary' %>
	  <a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
<% end %>
		

 		