<% javascript "admin.js" %>
<h1>
<%= _('New template') %>
<!-- link button to add new guidance -->
<div class="move_2_right">
<%= link_to _('View all templates'),
admin_index_template_path, class: "btn btn-primary" %>
</div>
</h1>
<div class="div_clear"></div>
<div class="white_background blue_border">
<!-- body -->
<div class="dmp_details">
<%= raw _('<p>To create a new template, first enter a title and description. Once you have saved this you will be presented with options to add one or more phases. </p>')%>
<br/>
<%= form_for :template, url: {action: "admin_create"} do |f| %>
<table class="dmp_details_table">
<tr>
<td class="first_template"><%= _('Title') %></td>
<td><%= f.text_field :title, as: :string,
class: "text_field has-tooltip", "data-toggle" => "tooltip", title: _('Please enter a title for your template.') %></td>
</tr>
<tr>
<td class="first_template"><%= _('Description') %></td>
<td class="tinymce">
<div class="div_left_icon">
<%= text_area_tag("template-desc", "", class: "tinymce") %>
</div>
<div class="div_right_icon">
<%= link_to( image_tag("help_button.png"), "#", class: "template_desc_popover", rel: "popover", "data-html" => "true", "data-content" => _("<div class='tooltip_box'>Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences.</div>"))%>
</div>
</td>
</tr>
</table>
<!-- submit buttons -->
<div class="move_2_right">
<%= f.submit _('Save'), class: "btn btn-primary" %>
<%= link_to _('Cancel'), admin_index_template_path, class: "btn cancel" %>
</div>
<br />
<% end %>
</div>
</div>
<%= tinymce :content_css => asset_path('application.css') %>