<% javascript 'admin.js' %>
<h1>
<%= _('Guidance group') %>
<!-- link button to add new guidance -->
<div class="move_2_right">
<%= link_to _('View all guidance'),
admin_index_guidance_path,
class: 'btn btn-primary' %>
</div>
</h1>
<div class="div_clear"></div>
<div class="white_background blue_border">
<!-- body -->
<div class="dmp_details">
<div class="dmp_details_body">
<%= form_for(@guidance_group, url: admin_update_guidance_group_path(@guidance_group), html: {method: :put}) do |f| %>
<table class="dmp_details_table guidance_table">
<tr>
<td class="first"><%= _('Name') %></td>
<td>
<div class="div_left_icon_g">
<%= f.text_field :name,
as: :string,
class: 'text_field' %>
</div>
<div class="div_right_icon_g">
<%= link_to(image_tag('help_button.png'), '#', class: 'guidance_group_title_popover', rel: "popover", 'data-html' => "true", 'data-content' => _('Add an appropriate name for your guidance group. This name will be used to tell the end user where the guidance has come from. It will be appended to text identifying the theme e.g. "[guidance group name]: guidance on data sharing" so we suggest you just use the institution or department name.')) %>
</div>
</td>
</tr>
<!-- if guidance group published then display check_box -->
<% if @guidance_group.published == true then %>
<tr>
<td class="first"><%= _('Published') %></td>
<td>
<div class="div_left_icon_g">
<%= f.check_box :published %>
</div>
<div class="div_right_icon_g">
<!--%= link_to( image_tag('help_button.png'), '#', :class => 'guidance_group_subset_popover', :rel => "popover", 'data-html' => "true", 'data-content' => _('If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.'))%-->
</div>
</td>
</tr>
<% end %>
<tr>
<td class="first"><%= _('Optional subset') %></td>
<td>
<div class="div_left_icon_g">
<%= f.check_box :optional_subset %> <%= _('e.g. School/ Department') %>
</div>
<div class="div_right_icon_g">
<%= link_to(image_tag('help_button.png'), '#', class: 'guidance_group_subset_popover', rel: "popover", 'data-html' => "true", 'data-content' => _("If the guidance is only meant for a subset of users e.g. those in a specific college or institute, check this box. Users will be able to select to display this subset guidance when answering questions in the 'create plan' wizard.")) %>
</div>
</td>
</tr>
</table>
<!-- submit buttons -->
<div class="move_2_right">
<%= f.submit _('Save'), class: 'btn btn-primary' %>
<% if @guidance_group.published == false then %>
<%= f.submit _('Publish'), name: "save_publish", class: "btn btn-primary" %>
<% end %>
<%= link_to _('Cancel'), :back, class: 'btn cancel' %>
</div>
<br/>
<% end %>
</div>
</div>
</div>