Newer
Older
dmpopidor / app / views / plans / _guidance_choices.html.erb
@Brian Riley Brian Riley on 14 Jul 2017 1012 bytes made suggested changes from PR
<% choices.each do |org, groups| %>
  <% if groups && groups.size == 1 %>
    <li>
      <%= check_box_tag "guidance_group_ids[]", groups[0].id,
                        current_selections.include?(groups[0].id), class: 'guidance-choice' %>
      <%= form.label org.name, for: groups[0].id, 
              class: 'inline checkbox-label regular-text guidance-group-label' %>
    </li>
  <% elsif groups %>
    <li>
      <input type="checkbox" disabled>
      <label class="inline checkbox-label regular-text guidance-group-label">
        <%= org.name %>
      </label>
    </li>
    <% groups.each do |group| %>
      <li class="under-input">
        <span>└─ </span> 
        <%= check_box_tag "guidance_group_ids[]", group.id,
                          current_selections.include?(group.id), class: 'guidance-choice' %>
        <%= form.label group.name, for: group.id, 
                class: "left-indent checkbox-label regular-text guidance-group-label" %>
      </li>
    <% end %>
  <% end%>
<% end %>