<!-- add a section and one question. Version is passed as an argument-->
<% @new_section = Section.new %>
<% @new_section.number = version.sections.count + 1 %>
<%= form_for @new_section, :url => {:action => "admin_createsection"} do |f| %>
<%= f.hidden_field :version_id, :value => version.id %>
<%= f.hidden_field :organisation_id, :value => current_user.organisation.id %>
<div class="accordion-group">
<div class="accordion-heading">
<div class="accordion-toggle">
<div class="accordion_heading_text">
<%= f.text_field :title, :as => :string, :class => "text_field", :placeholder => t("org_admin.templates.section_title_placeholder")%>
</div>
<!-- + or - icon-->
<span class="icon-minus icon-white accordion-icon"> </span>
</div>
</div>
<div id="collapse-sec" class="accordion-body section-collapse in collapse">
<div class="accordion-inner">
<table class="dmp_details_table">
<tr>
<td class="first_template"><%= t("org_admin.templates.phase_order_label") %></td>
<td>
<%= f.number_field :number, :in => 1..15, :class => "number_field has-tooltip", "data-toggle" => "tooltip", "title" => t("org_admin.templates.section_number_help_text") %></td>
</tr>
<tr>
<td class="first_template"><%= t("org_admin.templates.desc_label") %></td>
<td class="phase_table_last_column">
<div class="div_left_icon">
<%= text_area_tag("section-desc", "" , class: "tinymce") %>
</div>
<div class="div_right_icon">
<%= link_to( image_tag("help_button.png"), "#", :class => "section_desc_popover", :rel => "popover", "data-html" => "true", "data-content" => t("org_admin.templates.section_desc_help_text_html"))%>
</div>
</td>
</tr>
</table>
<!-- save buttons-->
<div class="move_2_right">
<%= f.submit t("helpers.submit.save"), :class => "btn btn-primary" %>
<%= link_to t("helpers.submit.cancel"), "#", :id => "", :class => "btn cancel" %>
</div>
<div class="two-column-clear"></div>
</div>
</div>
</div>
<%end%>