<%= render 'pulitzer/shared/error_messages', object: partial %> <%= form_for partial, html: ajax_form_hash(dom_target(partial.free_form_section, :partial_container), insert_method: 'append', empty_on_success: dom_target(partial.free_form_section, :new_partial)) do |f| %> <%= f.hidden_field :free_form_section_id %>
<%= f.text_field :label %>
<%= f.collection_select :post_type_version_id, Pulitzer::PostType.partials.order(:name), :published_type_version_id, :name, {}, revealer(dom_id(partial.free_form_section, :new_partial_type), highlander: true) %>
> <% Pulitzer::PostType.partials.map{|pt| pt.published_type_version}.compact.each do |post_type_version| %>
>
<% if post_type_version.arrangement_styles.any? %> <%= f.collection_select :arrangement_style_id, post_type_version.arrangement_styles, :id, :display_name, {}, {} %> <% else %>   <% end %>
<%= f.collection_select :background_style_id, post_type_version.background_styles, :id, :display_name, {}, {} %>
<%= f.collection_select :justification_style_id, post_type_version.justification_styles, :id, :display_name, {}, {} %>
<%= f.collection_select :sequence_flow_style_id, post_type_version.sequence_flow_styles, :id, :display_name, {}, {} %>
<% end %>
<%= submit_tag "Create" %>
Close
<% end %>