<% # encoding: utf-8 %>

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

			<div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabe1"><%= (@set_project_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_project_type.title_translations[locale] rescue nil) %>
						</div>
					</div>
				<% end %>
			<% end %>
			
            <div class="modal-footer">
				<%#= hidden_field_tag 'project_category[project_category]', @set_project_type.id %>
				<%= f.submit t('submit'), :class=>'btn btn-primary' %>
				<a class="btn" data-dismiss="modal"><%= t('cancel')%></a>
            </div>
<% end %>
		