<!-- edit template details A template is passed as an argument-->
<%= form_for(template, url: admin_update_template_path(template), html: { method: :put, class: 'roadmap-form'}) do |f| %>
<fieldset class="side-by-side">
<div class="form-input">
<%= f.label :title, class: 'required' %>
<%= f.text_field :title, as: :string, class: 'input-large has-tooltip',
'data-toggle': "tooltip",
title: _('Please enter a title for your template.') %>
</div>
<div class="form-input">
<%= f.label _('Description'), for: template.description %>
<%= text_area_tag("template-desc", template.description, class: "input-large tinymce") %>
<div class="inline">
<a href="#" data-toggle="popover" rel: "popover" data-html: "true" role="button"
data-content="<%= _('Enter a description that helps you to differentiate between templates e.g. if you have ones for different audiences') %>" aria-label="<% _('More information: Template descriptions') %>">
<span class="fa fa-question-circle" aria-hidden="true"></span></a>
</div>
</div>
<div class="form-input">
<label for="status"><%= _('Status') %></label>
<div id="status" class="read-only">
<% if hash[:live].nil? %>
<%= _('Unpublished') %>
<% elsif hash[:current].dirty? %>
<%= _('You have un-published changes') %>
<% else %>
<%= _('Published') %>
<% end %>
</div>
</div>
<div class="form-input">
<label for="created"><%= _('Created at') %></label>
<div id="created" class="read-only">
<%= l template.created_at.to_date, formats: :short %>
</div>
</div>
<div class="form-input">
<label for="updated"><%= _('Last updated') %></label>
<div id="updated" class="read-only">
<%= l template.updated_at.to_date, formats: :short %>
</div>
</div>
<br />
<div class="form-input">
<div class="button-spacer"> </div>
<%= f.submit _('Save'), class: 'form-submit' %>
<%= link_to _('Cancel'), admin_template_template_path(template) %>
</div>
</fieldset>
<% end %>