128e9ed8bSDixsie Wolmers<!-- Add & Remove Role Groups Buttons -->
25e258e43Sbeccabroek<div class="row column">
328e9ed8bSDixsie Wolmers  <button
428e9ed8bSDixsie Wolmers    type="button"
528e9ed8bSDixsie Wolmers    ng-class="{'disabled' : roleGroupType === '' }"
628e9ed8bSDixsie Wolmers    ng-disabled="roleGroupType === ''"
728e9ed8bSDixsie Wolmers    class="btn btn-tertiary"
828e9ed8bSDixsie Wolmers    ng-click="addGroupFn(); $parent.newGroup={}"
928e9ed8bSDixsie Wolmers  >
105e258e43Sbeccabroek    <icon aria-hidden="true" file="icon-plus.svg"></icon>
115e258e43Sbeccabroek    <span>Add role group</span>
125e258e43Sbeccabroek  </button>
1328e9ed8bSDixsie Wolmers  <button
1428e9ed8bSDixsie Wolmers    type="button"
1528e9ed8bSDixsie Wolmers    ng-disabled="roleGroupType === '' || !hasSelectedGroup"
1628e9ed8bSDixsie Wolmers    class="btn btn-tertiary"
1728e9ed8bSDixsie Wolmers    ng-click="removeMultipleRoleGroupsFn() "
1828e9ed8bSDixsie Wolmers  >
195e258e43Sbeccabroek    <icon aria-hidden="true" file="icon-trashcan.svg"></icon>
205e258e43Sbeccabroek    <span>Remove role groups</span>
215e258e43Sbeccabroek  </button>
225e258e43Sbeccabroek</div>
2328e9ed8bSDixsie Wolmers<!-- LDAP Role Groups Table -->
245e258e43Sbeccabroek<div class="ldap__table">
2528e9ed8bSDixsie Wolmers  <!-- LDAP Role Groups Table Header -->
265e258e43Sbeccabroek  <div class="table__row-header row column" ng-class="{'disabled' : !enabled }">
275e258e43Sbeccabroek    <div class="row column">
285e258e43Sbeccabroek      <div class="table__cell-select">
2928e9ed8bSDixsie Wolmers        <label class="control-check">
3028e9ed8bSDixsie Wolmers          <span class="screen-reader-offscreen" id="select-all-groups"
3128e9ed8bSDixsie Wolmers            >select or deselect all groups</span
3228e9ed8bSDixsie Wolmers          >
3328e9ed8bSDixsie Wolmers          <input
3428e9ed8bSDixsie Wolmers            type="checkbox"
3528e9ed8bSDixsie Wolmers            aria-labelledby="select-all-groups"
3628e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
3728e9ed8bSDixsie Wolmers            ng-click="toggleAll()"
3828e9ed8bSDixsie Wolmers            ng-checked="roleGroupIsSelectedChanged()"
3928e9ed8bSDixsie Wolmers            ng-model="all"
4028e9ed8bSDixsie Wolmers          />
415e258e43Sbeccabroek          <span class="control__indicator"></span>
425e258e43Sbeccabroek        </label>
435e258e43Sbeccabroek      </div>
445e258e43Sbeccabroek      <div class="table__cell-sort">
455e258e43Sbeccabroek        <div class="column small-2 sort_button_wrapper">
4628e9ed8bSDixsie Wolmers          <button
4728e9ed8bSDixsie Wolmers            class="sort-ascending"
4828e9ed8bSDixsie Wolmers            aria-label="sort group names in ascending order"
4928e9ed8bSDixsie Wolmers            ng-click="sortBy('RemoteGroup', false)"
5028e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
5128e9ed8bSDixsie Wolmers          ></button>
5228e9ed8bSDixsie Wolmers          <button
5328e9ed8bSDixsie Wolmers            class="sort-descending"
5428e9ed8bSDixsie Wolmers            aria-label="sort group names in descending order"
5528e9ed8bSDixsie Wolmers            ng-click="sortBy('RemoteGroup', true)"
5628e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
5728e9ed8bSDixsie Wolmers          ></button>
585e258e43Sbeccabroek        </div>
595e258e43Sbeccabroek      </div>
605e258e43Sbeccabroek      <div class="table__cell-ldap-group">
615e258e43Sbeccabroek        Group name
625e258e43Sbeccabroek      </div>
635e258e43Sbeccabroek      <div class="table__cell-sort">
645e258e43Sbeccabroek        <div class="column small-2 sort_button_wrapper">
6528e9ed8bSDixsie Wolmers          <button
6628e9ed8bSDixsie Wolmers            class="sort-ascending"
6728e9ed8bSDixsie Wolmers            aria-label="sort group privileges in ascending order"
6828e9ed8bSDixsie Wolmers            ng-click="sortBy('LocalRole', false)"
6928e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
7028e9ed8bSDixsie Wolmers          ></button>
7128e9ed8bSDixsie Wolmers          <button
7228e9ed8bSDixsie Wolmers            class="sort-descending"
7328e9ed8bSDixsie Wolmers            aria-label="sort group privileges in descending order"
7428e9ed8bSDixsie Wolmers            ng-click="sortBy('LocalRole', true)"
7528e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
7628e9ed8bSDixsie Wolmers          ></button>
775e258e43Sbeccabroek        </div>
785e258e43Sbeccabroek      </div>
795e258e43Sbeccabroek      <div class="table__cell-ldap-role">
805e258e43Sbeccabroek        Group privilege
815e258e43Sbeccabroek      </div>
825e258e43Sbeccabroek    </div>
835e258e43Sbeccabroek  </div>
8428e9ed8bSDixsie Wolmers  <!-- LDAP Disabled Role Groups Table Row -->
855e258e43Sbeccabroek  <div class="empty__logs" ng-if="roleGroups.length < 1 || !enabled">
8628e9ed8bSDixsie Wolmers    <p
87*7bdb91d4SDerick Montague      ng-if="!roleGroups.length && roleGroupType"
8828e9ed8bSDixsie Wolmers    >
895e258e43Sbeccabroek      No role groups have been created yet.
905e258e43Sbeccabroek    </p>
915e258e43Sbeccabroek    <p ng-if=" roleGroupType === '' " ng-class="{'disabled' : !enabled }">
925e258e43Sbeccabroek      LDAP authentication must be enabled before creating role groups.
935e258e43Sbeccabroek    </p>
945e258e43Sbeccabroek  </div>
9528e9ed8bSDixsie Wolmers  <div
9628e9ed8bSDixsie Wolmers    ng-repeat="group in roleGroups | orderBy:sortPropertyName:reverse track by $index "
9728e9ed8bSDixsie Wolmers  >
9828e9ed8bSDixsie Wolmers    <!-- Enabled LDAP Role Groups Table Rows -->
995e258e43Sbeccabroek    <div class="row column table__row-value" ng-if="enabled">
1005e258e43Sbeccabroek      <div class="table__cell-select select-header">
10128e9ed8bSDixsie Wolmers        <label class="control-check">
10228e9ed8bSDixsie Wolmers          <span class="screen-reader-offscreen" id="select-group"
10328e9ed8bSDixsie Wolmers            >select or deselect {{ group.RemoteGroup }}</span
10428e9ed8bSDixsie Wolmers          >
10528e9ed8bSDixsie Wolmers          <input
10628e9ed8bSDixsie Wolmers            type="checkbox"
10728e9ed8bSDixsie Wolmers            aria-labelledby="select-group"
10828e9ed8bSDixsie Wolmers            ng-model="group.isSelected"
10928e9ed8bSDixsie Wolmers            ng-change="roleGroupIsSelectedChanged(); optionToggled()"
11028e9ed8bSDixsie Wolmers          />
1115e258e43Sbeccabroek          <span class="control__indicator"></span>
1125e258e43Sbeccabroek        </label>
1135e258e43Sbeccabroek      </div>
1145e258e43Sbeccabroek      <div class="table__cell-ldap">
1155e258e43Sbeccabroek        {{ group.RemoteGroup }}
1165e258e43Sbeccabroek      </div>
1175e258e43Sbeccabroek      <div class="table__cell-ldap">
1185e258e43Sbeccabroek        {{ group.LocalRole }}
1195e258e43Sbeccabroek      </div>
1205e258e43Sbeccabroek      <div class="table__cell-buttons">
12128e9ed8bSDixsie Wolmers        <button
12228e9ed8bSDixsie Wolmers          class="btn btn-tertiary"
12328e9ed8bSDixsie Wolmers          type="button"
12428e9ed8bSDixsie Wolmers          aria-label="edit group {{ group.RemoteGroup }}"
12528e9ed8bSDixsie Wolmers          ng-click="editGroupFn(group.RemoteGroup, group.LocalRole, $index); newGroup.RemoteGroup = group.RemoteGroup; newGroup.LocalRole = group.LocalRole; selectedGroupIndex = $index"
12628e9ed8bSDixsie Wolmers        >
1275e258e43Sbeccabroek          <icon aria-hidden="true" file="icon-edit.svg"></icon>
1285e258e43Sbeccabroek        </button>
12928e9ed8bSDixsie Wolmers        <button
13028e9ed8bSDixsie Wolmers          class="btn btn-tertiary"
13128e9ed8bSDixsie Wolmers          type="button"
13228e9ed8bSDixsie Wolmers          aria-label="delete group {{ group.RemoteGroup }}"
1335e258e43Sbeccabroek          ng-class="{'disabled' : roleGroups.length < 1}"
13428e9ed8bSDixsie Wolmers          ng-click="removeGroupFn($index); newGroup.RemoteGroup = group.RemoteGroup; newGroup.LocalRole = group.LocalRole; selectedGroupIndex = $index"
13528e9ed8bSDixsie Wolmers        >
1365e258e43Sbeccabroek          <icon aria-hidden="true" file="icon-trashcan.svg"></icon>
1375e258e43Sbeccabroek        </button>
1385e258e43Sbeccabroek      </div>
1395e258e43Sbeccabroek    </div>
1405e258e43Sbeccabroek  </div>
1415e258e43Sbeccabroek</div>
14228e9ed8bSDixsie Wolmers<!-- Add/Edit Role Group Modal -->
14328e9ed8bSDixsie Wolmers<section
14428e9ed8bSDixsie Wolmers  class="modal"
14528e9ed8bSDixsie Wolmers  aria-labelledby="add-or-edit-group"
14628e9ed8bSDixsie Wolmers  role="dialog"
14728e9ed8bSDixsie Wolmers  ng-class="{'active': addGroup || editGroup}"
14828e9ed8bSDixsie Wolmers>
14928e9ed8bSDixsie Wolmers  <h3 id="add-or-edit-group" class="subhead">
15028e9ed8bSDixsie Wolmers    {{ addGroup ? "Add new role group" : "Edit group privilege" }}
15128e9ed8bSDixsie Wolmers  </h3>
1525e258e43Sbeccabroek  <div class="modal__content-ldap">
15328e9ed8bSDixsie Wolmers    <!-- Add Role Group Modal Content -->
1545e258e43Sbeccabroek    <div ng-if="addGroup">
1555e258e43Sbeccabroek      <form name="add__group__form" id="add__group__form" novalidate>
1565e258e43Sbeccabroek        <div class="small-9">
1575e258e43Sbeccabroek          <label for="group_name">Role group name</label>
15828e9ed8bSDixsie Wolmers          <input
15928e9ed8bSDixsie Wolmers            type="text"
16028e9ed8bSDixsie Wolmers            name="group_name"
16128e9ed8bSDixsie Wolmers            id="group_name"
16228e9ed8bSDixsie Wolmers            ng-model="newGroup.RemoteGroup"
16328e9ed8bSDixsie Wolmers            required
16428e9ed8bSDixsie Wolmers          />
16528e9ed8bSDixsie Wolmers          <div
16628e9ed8bSDixsie Wolmers            ng-messages="add__group__form.group_name.$error"
16728e9ed8bSDixsie Wolmers            class="form-error"
16828e9ed8bSDixsie Wolmers            ng-class="{'visible' : add__group__form.group_name.$touched}"
16928e9ed8bSDixsie Wolmers          >
1705e258e43Sbeccabroek            <p ng-message="required">Field is required</p>
1715e258e43Sbeccabroek          </div>
1725e258e43Sbeccabroek        </div>
1735e258e43Sbeccabroek        <div class="small-9">
1745e258e43Sbeccabroek          <label for="group__role">Privilege</label>
17528e9ed8bSDixsie Wolmers          <select
17628e9ed8bSDixsie Wolmers            id="group__role"
17728e9ed8bSDixsie Wolmers            class="select__group-role"
17828e9ed8bSDixsie Wolmers            name="group__role"
17928e9ed8bSDixsie Wolmers            ng-model="newGroup.LocalRole"
18028e9ed8bSDixsie Wolmers            required
18128e9ed8bSDixsie Wolmers          >
1825e258e43Sbeccabroek            <option class="courier-bold" ng-value="">Select an option</option>
1835e258e43Sbeccabroek            <option class="courier-bold" ng-repeat="privilege in privileges">{{
1845e258e43Sbeccabroek              privilege
1855e258e43Sbeccabroek            }}</option>
1865e258e43Sbeccabroek          </select>
18728e9ed8bSDixsie Wolmers          <div
18828e9ed8bSDixsie Wolmers            ng-messages="add__group__form.group__role.$error"
18928e9ed8bSDixsie Wolmers            class="form-error"
19028e9ed8bSDixsie Wolmers            ng-class="{'visible' : add__group__form.group__role.$touched}"
19128e9ed8bSDixsie Wolmers          >
1925e258e43Sbeccabroek            <p ng-message="required">Field is required</p>
1935e258e43Sbeccabroek          </div>
1945e258e43Sbeccabroek        </div>
1955e258e43Sbeccabroek      </form>
1965e258e43Sbeccabroek      <div class="form-actions">
19728e9ed8bSDixsie Wolmers        <button
19828e9ed8bSDixsie Wolmers          type="button"
19928e9ed8bSDixsie Wolmers          class="btn btn-primary"
20028e9ed8bSDixsie Wolmers          ng-class="{'disabled' : add__group__form.$invalid}"
20128e9ed8bSDixsie Wolmers          ng-click="addRoleGroup(); $parent.addGroup=false; $parent.newGroup={}"
20228e9ed8bSDixsie Wolmers        >
2035e258e43Sbeccabroek          Save
2045e258e43Sbeccabroek        </button>
20528e9ed8bSDixsie Wolmers        <button
20628e9ed8bSDixsie Wolmers          type="button"
20728e9ed8bSDixsie Wolmers          class="btn btn-secondary"
20828e9ed8bSDixsie Wolmers          ng-click="$parent.addGroup=false; $parent.newGroup={}"
20928e9ed8bSDixsie Wolmers        >
2105e258e43Sbeccabroek          Cancel
2115e258e43Sbeccabroek        </button>
2125e258e43Sbeccabroek      </div>
2135e258e43Sbeccabroek    </div>
21428e9ed8bSDixsie Wolmers    <!-- Edit Role Group Modal Content -->
2155e258e43Sbeccabroek    <div ng-if="editGroup">
2165e258e43Sbeccabroek      <form name="edit__group__form" id="edit__group__form" novalidate>
2175e258e43Sbeccabroek        <label>Role group name</label>
2185e258e43Sbeccabroek        <div class="small-9 edit-group-name" ng-model="newGroup.RemoteGroup">
2195e258e43Sbeccabroek          {{ newGroup.RemoteGroup }}
2205e258e43Sbeccabroek        </div>
2215e258e43Sbeccabroek        <div class="small-9">
2225e258e43Sbeccabroek          <label for="group__role__edit">Privilege</label>
22328e9ed8bSDixsie Wolmers          <select
22428e9ed8bSDixsie Wolmers            id="group__role__edit"
22528e9ed8bSDixsie Wolmers            name="group__role__edit"
22628e9ed8bSDixsie Wolmers            ng-model="newGroup.LocalRole"
22728e9ed8bSDixsie Wolmers            required
22828e9ed8bSDixsie Wolmers          >
2295e258e43Sbeccabroek            <option class="courier-bold" ng-repeat="privilege in privileges">{{
2305e258e43Sbeccabroek              privilege
2315e258e43Sbeccabroek            }}</option>
2325e258e43Sbeccabroek          </select>
23328e9ed8bSDixsie Wolmers          <div
23428e9ed8bSDixsie Wolmers            ng-messages="edit__group__form.group__role__edit.$error"
23528e9ed8bSDixsie Wolmers            class="form-error"
23628e9ed8bSDixsie Wolmers            ng-class="{'visible' : edit__group__form.group__role__edit.$touched}"
23728e9ed8bSDixsie Wolmers          >
2385e258e43Sbeccabroek            <p ng-message="required">Field is required</p>
2395e258e43Sbeccabroek          </div>
2405e258e43Sbeccabroek        </div>
2415e258e43Sbeccabroek      </form>
2425e258e43Sbeccabroek      <div class="form-actions">
24328e9ed8bSDixsie Wolmers        <button
24428e9ed8bSDixsie Wolmers          type="button"
24528e9ed8bSDixsie Wolmers          class="btn btn-primary"
24628e9ed8bSDixsie Wolmers          ng-click="editRoleGroup();$parent.editGroup=false; $parent.newGroup={}"
24728e9ed8bSDixsie Wolmers        >
2485e258e43Sbeccabroek          Save
2495e258e43Sbeccabroek        </button>
25028e9ed8bSDixsie Wolmers        <button
25128e9ed8bSDixsie Wolmers          type="button"
25228e9ed8bSDixsie Wolmers          class="btn btn-secondary"
25328e9ed8bSDixsie Wolmers          ng-click="$parent.editGroup=false; $parent.newGroup={}"
25428e9ed8bSDixsie Wolmers        >
2555e258e43Sbeccabroek          Cancel
2565e258e43Sbeccabroek        </button>
2575e258e43Sbeccabroek      </div>
2585e258e43Sbeccabroek    </div>
2595e258e43Sbeccabroek  </div>
2605e258e43Sbeccabroek</section>
26128e9ed8bSDixsie Wolmers<!-- Remove Role Groups Modal -->
26228e9ed8bSDixsie Wolmers<section
26328e9ed8bSDixsie Wolmers  class="modal"
26428e9ed8bSDixsie Wolmers  role="dialog"
26528e9ed8bSDixsie Wolmers  aria-labelledby="remove-role-group"
26628e9ed8bSDixsie Wolmers  ng-class="{'active': removeGroup}"
26728e9ed8bSDixsie Wolmers>
26828e9ed8bSDixsie Wolmers  <h3 id="remove-role-group" class="subhead">Remove role group</h3>
2695e258e43Sbeccabroek  <div class="modal__content-ldap">
2705e258e43Sbeccabroek    <p>Are you sure you want to remove "{{ newGroup.RemoteGroup }}"?</p>
2715e258e43Sbeccabroek  </div>
2725e258e43Sbeccabroek  <div class="form-actions">
27328e9ed8bSDixsie Wolmers    <button
27428e9ed8bSDixsie Wolmers      type="button"
27528e9ed8bSDixsie Wolmers      class="btn btn-primary"
27628e9ed8bSDixsie Wolmers      ng-click="removeRoleGroup(); $parent.removeGroup=false; newGroup={}"
27728e9ed8bSDixsie Wolmers    >
2785e258e43Sbeccabroek      Remove
2795e258e43Sbeccabroek    </button>
28028e9ed8bSDixsie Wolmers    <button
28128e9ed8bSDixsie Wolmers      type="button"
28228e9ed8bSDixsie Wolmers      class="btn btn-secondary"
28328e9ed8bSDixsie Wolmers      ng-click="removeGroup=false; $parent.removeGroup=false; newGroup={}"
28428e9ed8bSDixsie Wolmers    >
2855e258e43Sbeccabroek      Cancel
2865e258e43Sbeccabroek    </button>
2875e258e43Sbeccabroek  </div>
2885e258e43Sbeccabroek</section>
28928e9ed8bSDixsie Wolmers<!-- Remove Multiple Role Groups Modal -->
29028e9ed8bSDixsie Wolmers<section
29128e9ed8bSDixsie Wolmers  class="modal"
29228e9ed8bSDixsie Wolmers  role="dialog"
29328e9ed8bSDixsie Wolmers  ng-class="{'active': removeMultipleGroups}"
29428e9ed8bSDixsie Wolmers>
2955e258e43Sbeccabroek  <div class="page-header">
2965e258e43Sbeccabroek    <h3>Remove role group</h3>
2975e258e43Sbeccabroek  </div>
2985e258e43Sbeccabroek  <div class="modal__content-ldap">
2995e258e43Sbeccabroek    <p>
3005e258e43Sbeccabroek      Are you sure you want to remove
30128e9ed8bSDixsie Wolmers      <span ng-repeat="groups in roleGroups | filter:{isSelected:true}"
30228e9ed8bSDixsie Wolmers        >{{ $last && !$first ? " and " : $first ? "" : ", "
30328e9ed8bSDixsie Wolmers        }}{{ "'" + groups.RemoteGroup + "'" }}?</span
30428e9ed8bSDixsie Wolmers      >
3055e258e43Sbeccabroek    </p>
3065e258e43Sbeccabroek  </div>
3075e258e43Sbeccabroek  <div class="form-actions">
30828e9ed8bSDixsie Wolmers    <button
30928e9ed8bSDixsie Wolmers      type="button"
31028e9ed8bSDixsie Wolmers      class="btn btn-primary"
31128e9ed8bSDixsie Wolmers      ng-click="removeMultipleRoleGroups();$parent.removeMultipleGroups=false; $parent.newGroup={}"
31228e9ed8bSDixsie Wolmers    >
3135e258e43Sbeccabroek      Remove
3145e258e43Sbeccabroek    </button>
31528e9ed8bSDixsie Wolmers    <button
31628e9ed8bSDixsie Wolmers      type="button"
31728e9ed8bSDixsie Wolmers      class="btn btn-secondary"
31828e9ed8bSDixsie Wolmers      ng-click="removeMultipleGroups = false"
31928e9ed8bSDixsie Wolmers    >
3205e258e43Sbeccabroek      Cancel
3215e258e43Sbeccabroek    </button>
3225e258e43Sbeccabroek  </div>
3235e258e43Sbeccabroek</section>
32428e9ed8bSDixsie Wolmers<div
32528e9ed8bSDixsie Wolmers  class="modal-overlay"
32628e9ed8bSDixsie Wolmers  tabindex="-1"
32728e9ed8bSDixsie Wolmers  ng-class="{'active': addGroup || editGroup || removeGroup || removeMultipleGroups}"
32828e9ed8bSDixsie Wolmers></div>
329