<h2>New Field definition for <%= @fields_definition.target.constantize.model_name.human %></h2>

<p>
Here you can add a field to store information about your partners and make it Hidden, Read Only, Required, or provide a different label. The label is the text your partners will see when viewing or entering their data.
</p>

<div id="usage-rules">
<%= semantic_form_for(@fields_definition, :url => admin_fields_definitions_path) do |f| %>
  <%= f.error_messages %>
  <%= f.inputs do %>
    <%= select_tag :fields_definition_fieldname, options_for_select(@optional_fields.map{|opt| [opt,opt]})%>
    <%= render :partial => 'form', :locals => { :f=> f } %>
  <% end %>

  <%= f.buttons do %>
    <%= f.commit_button 'Create' %>
  <% end %>
<% end %>
</div>

 <input name="hidden_field" id="required_fields" type="hidden" value="<%=(@required_fields.join(','))%>" />
