<% # encoding: utf-8 %>

<%= form_for(@set_author_type, :remote => true, :url => @author_type_url ) do |f| %>

			<div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabe2"><%= (@set_author_type.new_record? ? 'Add 作者型態' : 'Edit 作者型態') %></h3>
            </div>
            <div class="modal-body">
			
			<div class="control-group">
				<label for="http" class="control-label">Key</label>
				<div class="controls">
				<%= f.text_field :key %>
			</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 => 'control-label', :value => (@set_author_type.title_translations[locale] rescue nil) %>
						</div>
					</div>
				<% end %>
			<% end %>
            </div>
            <div class="modal-footer">
				<%= hidden_field_tag 'writing_journal_category[author_type]', @set_author_type.id %>
				<%= f.submit t('submit'), :class=>'btn btn-primary' %>
				<a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
            </div>
<% end %>
		