<!-- edit template details A template is passed as an argument-->
<%= form_for(template, url: admin_update_template_path(template), html: { method: :put}) do |f| %>
<br/>
<table class="dmp_details_table">
<tr>
<td class="first_template"><%= t('org_admin.templates.title_label') %></td>
<td><%= f.text_field :title, as: :string,
class: 'text_field has-tooltip', 'data-toggle' => "tooltip", title: t('org_admin.templates.title_help_text') %></td>
</tr>
<tr>
<td class="first_template"><%= t('org_admin.templates.desc_label') %></td>
<td><div class="div_left_icon">
<%= text_area_tag("template-desc", template.description, 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' => t('org_admin.templates.desc_help_text_html'))%>
</div>
</td>
</tr>
<tr>
<td class="first_template"><%= t('org_admin.templates.published_label') %></td>
<td>
<%= f.check_box :published, as: :check_boxes %>
</td>
</tr>
<tr>
<td class="first_template"><%= t('org_admin.templates.created') %></td>
<td>
<%= l template.created_at.to_date, formats: :short %>
</td>
</tr>
<tr>
<td class="first_template"><%= t('org_admin.templates.last_updated') %></td>
<td>
<%= l template.updated_at.to_date, formats: :short %>
</td>
</tr>
</table>
<!-- submit buttons -->
<div class="move_2_right">
<%= f.submit t('helpers.submit.save'), class: 'btn btn-primary' %>
<%= link_to t('helpers.submit.cancel'), admin_template_template_path(template), class: 'btn cancel' %>
</div>
<br />
<% end %>