Newer
Older
dmpopidor / app / views / guidance_groups / admin_edit.html.erb
@John Pinto John Pinto on 6 Aug 2019 2 KB Enable spellcheck for text fields:
<% title _('Guidance group') %>
<div class="row">
  <div class="col-md-12">
    <h1><%= _('Guidance group') %></h1>
    <%= link_to _('View all guidance'), admin_index_guidance_path(current_user.org_id), class: 'btn btn-default pull-right' %>
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <%= form_for(@guidance_group, url: admin_update_guidance_group_path(@guidance_group), html: {method: :put, id: "admin_update_guidance_group_form" }) do |f| %>

        <div class="form-group col-xs-8">
          <%= f.label _('Name'), for: :name, class: "control-label" %>
          <%= f.text_field :name, as: :string, class: "form-control", spellcheck: true, 'aria-required': true, 'data-toggle': 'tooltip', title: _('Add an appropriate name for your guidance group. This name will tell the end user where the guidance has come from. We suggest you use the organisation or department name e.g. "OU" or "Maths & Stats"') %>
        </div>

        <div class='form-input col-xs-8'>
          <%= f.check_box :published, 'data-toggle': 'tooltip', title: _("Check this box when you are ready for guidance associated with this group to appear on user's plans.") %>
          <%= f.label _('Published'), for: :published, class: "control-label" %>
        </div>

        <div class='form-input col-xs-8'>
          <%= f.check_box :optional_subset, 'data-toggle': 'tooltip', title: _("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.") %>
          <%= f.label _('Optional Subset'), for: :optional_subset, class: "control-label" %><%= _(' (e.g. School/ Department) ') %>
        </div>

        <div class="form-group col-xs-8">
          <%= f.submit _('Save'), class: "btn btn-primary" %>
          <%= link_to _('Cancel'), admin_index_guidance_path, class: "btn btn-primary", role: 'button' %>
        </div>
    <% end %>
  </div>
</div>