1*28e9ed8bSDixsie Wolmers<!-- Add & Remove Role Groups Buttons -->
25e258e43Sbeccabroek<div class="row column">
3*28e9ed8bSDixsie Wolmers  <button
4*28e9ed8bSDixsie Wolmers    type="button"
5*28e9ed8bSDixsie Wolmers    ng-class="{'disabled' : roleGroupType === '' }"
6*28e9ed8bSDixsie Wolmers    ng-disabled="roleGroupType === ''"
7*28e9ed8bSDixsie Wolmers    class="btn btn-tertiary"
8*28e9ed8bSDixsie Wolmers    ng-click="addGroupFn(); $parent.newGroup={}"
9*28e9ed8bSDixsie Wolmers  >
105e258e43Sbeccabroek    <icon aria-hidden="true" file="icon-plus.svg"></icon>
115e258e43Sbeccabroek    <span>Add role group</span>
125e258e43Sbeccabroek  </button>
13*28e9ed8bSDixsie Wolmers  <button
14*28e9ed8bSDixsie Wolmers    type="button"
15*28e9ed8bSDixsie Wolmers    ng-disabled="roleGroupType === '' || !hasSelectedGroup"
16*28e9ed8bSDixsie Wolmers    class="btn btn-tertiary"
17*28e9ed8bSDixsie Wolmers    ng-click="removeMultipleRoleGroupsFn() "
18*28e9ed8bSDixsie Wolmers  >
195e258e43Sbeccabroek    <icon aria-hidden="true" file="icon-trashcan.svg"></icon>
205e258e43Sbeccabroek    <span>Remove role groups</span>
215e258e43Sbeccabroek  </button>
225e258e43Sbeccabroek</div>
23*28e9ed8bSDixsie Wolmers<!-- LDAP Role Groups Table -->
245e258e43Sbeccabroek<div class="ldap__table">
25*28e9ed8bSDixsie 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">
29*28e9ed8bSDixsie Wolmers        <label class="control-check">
30*28e9ed8bSDixsie Wolmers          <span class="screen-reader-offscreen" id="select-all-groups"
31*28e9ed8bSDixsie Wolmers            >select or deselect all groups</span
32*28e9ed8bSDixsie Wolmers          >
33*28e9ed8bSDixsie Wolmers          <input
34*28e9ed8bSDixsie Wolmers            type="checkbox"
35*28e9ed8bSDixsie Wolmers            aria-labelledby="select-all-groups"
36*28e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
37*28e9ed8bSDixsie Wolmers            ng-click="toggleAll()"
38*28e9ed8bSDixsie Wolmers            ng-checked="roleGroupIsSelectedChanged()"
39*28e9ed8bSDixsie Wolmers            ng-model="all"
40*28e9ed8bSDixsie 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">
46*28e9ed8bSDixsie Wolmers          <button
47*28e9ed8bSDixsie Wolmers            class="sort-ascending"
48*28e9ed8bSDixsie Wolmers            aria-label="sort group names in ascending order"
49*28e9ed8bSDixsie Wolmers            ng-click="sortBy('RemoteGroup', false)"
50*28e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
51*28e9ed8bSDixsie Wolmers          ></button>
52*28e9ed8bSDixsie Wolmers          <button
53*28e9ed8bSDixsie Wolmers            class="sort-descending"
54*28e9ed8bSDixsie Wolmers            aria-label="sort group names in descending order"
55*28e9ed8bSDixsie Wolmers            ng-click="sortBy('RemoteGroup', true)"
56*28e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
57*28e9ed8bSDixsie 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">
65*28e9ed8bSDixsie Wolmers          <button
66*28e9ed8bSDixsie Wolmers            class="sort-ascending"
67*28e9ed8bSDixsie Wolmers            aria-label="sort group privileges in ascending order"
68*28e9ed8bSDixsie Wolmers            ng-click="sortBy('LocalRole', false)"
69*28e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
70*28e9ed8bSDixsie Wolmers          ></button>
71*28e9ed8bSDixsie Wolmers          <button
72*28e9ed8bSDixsie Wolmers            class="sort-descending"
73*28e9ed8bSDixsie Wolmers            aria-label="sort group privileges in descending order"
74*28e9ed8bSDixsie Wolmers            ng-click="sortBy('LocalRole', true)"
75*28e9ed8bSDixsie Wolmers            ng-disabled="!enabled || roleGroups.length < 1 "
76*28e9ed8bSDixsie Wolmers          ></button>
775e258e43Sbeccabroek        </div>
785e258e43Sbeccabroek      </div>
795e258e43Sbeccabroek      <div class="table__cell-ldap-role">
805e258e43Sbeccabroek        Group privilege
815e258e43Sbeccabroek      </div>
825e258e43Sbeccabroek    </div>
835e258e43Sbeccabroek  </div>
84*28e9ed8bSDixsie Wolmers  <!-- LDAP Disabled Role Groups Table Row -->
855e258e43Sbeccabroek  <div class="empty__logs" ng-if="roleGroups.length < 1 || !enabled">
86*28e9ed8bSDixsie Wolmers    <p
87*28e9ed8bSDixsie Wolmers      ng-if="roleGroups.length < 1 && roleGroupType === 'ad' ||  roleGroupType === 'ldap'"
88*28e9ed8bSDixsie 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>
95*28e9ed8bSDixsie Wolmers  <div
96*28e9ed8bSDixsie Wolmers    ng-repeat="group in roleGroups | orderBy:sortPropertyName:reverse track by $index "
97*28e9ed8bSDixsie Wolmers  >
98*28e9ed8bSDixsie 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">
101*28e9ed8bSDixsie Wolmers        <label class="control-check">
102*28e9ed8bSDixsie Wolmers          <span class="screen-reader-offscreen" id="select-group"
103*28e9ed8bSDixsie Wolmers            >select or deselect {{ group.RemoteGroup }}</span
104*28e9ed8bSDixsie Wolmers          >
105*28e9ed8bSDixsie Wolmers          <input
106*28e9ed8bSDixsie Wolmers            type="checkbox"
107*28e9ed8bSDixsie Wolmers            aria-labelledby="select-group"
108*28e9ed8bSDixsie Wolmers            ng-model="group.isSelected"
109*28e9ed8bSDixsie Wolmers            ng-change="roleGroupIsSelectedChanged(); optionToggled()"
110*28e9ed8bSDixsie 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">
121*28e9ed8bSDixsie Wolmers        <button
122*28e9ed8bSDixsie Wolmers          class="btn btn-tertiary"
123*28e9ed8bSDixsie Wolmers          type="button"
124*28e9ed8bSDixsie Wolmers          aria-label="edit group {{ group.RemoteGroup }}"
125*28e9ed8bSDixsie Wolmers          ng-click="editGroupFn(group.RemoteGroup, group.LocalRole, $index); newGroup.RemoteGroup = group.RemoteGroup; newGroup.LocalRole = group.LocalRole; selectedGroupIndex = $index"
126*28e9ed8bSDixsie Wolmers        >
1275e258e43Sbeccabroek          <icon aria-hidden="true" file="icon-edit.svg"></icon>
1285e258e43Sbeccabroek        </button>
129*28e9ed8bSDixsie Wolmers        <button
130*28e9ed8bSDixsie Wolmers          class="btn btn-tertiary"
131*28e9ed8bSDixsie Wolmers          type="button"
132*28e9ed8bSDixsie Wolmers          aria-label="delete group {{ group.RemoteGroup }}"
1335e258e43Sbeccabroek          ng-class="{'disabled' : roleGroups.length < 1}"
134*28e9ed8bSDixsie Wolmers          ng-click="removeGroupFn($index); newGroup.RemoteGroup = group.RemoteGroup; newGroup.LocalRole = group.LocalRole; selectedGroupIndex = $index"
135*28e9ed8bSDixsie Wolmers        >
1365e258e43Sbeccabroek          <icon aria-hidden="true" file="icon-trashcan.svg"></icon>
1375e258e43Sbeccabroek        </button>
1385e258e43Sbeccabroek      </div>
1395e258e43Sbeccabroek    </div>
1405e258e43Sbeccabroek  </div>
1415e258e43Sbeccabroek</div>
142*28e9ed8bSDixsie Wolmers<!-- Add/Edit Role Group Modal -->
143*28e9ed8bSDixsie Wolmers<section
144*28e9ed8bSDixsie Wolmers  class="modal"
145*28e9ed8bSDixsie Wolmers  aria-labelledby="add-or-edit-group"
146*28e9ed8bSDixsie Wolmers  role="dialog"
147*28e9ed8bSDixsie Wolmers  ng-class="{'active': addGroup || editGroup}"
148*28e9ed8bSDixsie Wolmers>
149*28e9ed8bSDixsie Wolmers  <h3 id="add-or-edit-group" class="subhead">
150*28e9ed8bSDixsie Wolmers    {{ addGroup ? "Add new role group" : "Edit group privilege" }}
151*28e9ed8bSDixsie Wolmers  </h3>
1525e258e43Sbeccabroek  <div class="modal__content-ldap">
153*28e9ed8bSDixsie 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>
158*28e9ed8bSDixsie Wolmers          <input
159*28e9ed8bSDixsie Wolmers            type="text"
160*28e9ed8bSDixsie Wolmers            name="group_name"
161*28e9ed8bSDixsie Wolmers            id="group_name"
162*28e9ed8bSDixsie Wolmers            ng-model="newGroup.RemoteGroup"
163*28e9ed8bSDixsie Wolmers            required
164*28e9ed8bSDixsie Wolmers          />
165*28e9ed8bSDixsie Wolmers          <div
166*28e9ed8bSDixsie Wolmers            ng-messages="add__group__form.group_name.$error"
167*28e9ed8bSDixsie Wolmers            class="form-error"
168*28e9ed8bSDixsie Wolmers            ng-class="{'visible' : add__group__form.group_name.$touched}"
169*28e9ed8bSDixsie 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>
175*28e9ed8bSDixsie Wolmers          <select
176*28e9ed8bSDixsie Wolmers            id="group__role"
177*28e9ed8bSDixsie Wolmers            class="select__group-role"
178*28e9ed8bSDixsie Wolmers            name="group__role"
179*28e9ed8bSDixsie Wolmers            ng-model="newGroup.LocalRole"
180*28e9ed8bSDixsie Wolmers            required
181*28e9ed8bSDixsie 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>
187*28e9ed8bSDixsie Wolmers          <div
188*28e9ed8bSDixsie Wolmers            ng-messages="add__group__form.group__role.$error"
189*28e9ed8bSDixsie Wolmers            class="form-error"
190*28e9ed8bSDixsie Wolmers            ng-class="{'visible' : add__group__form.group__role.$touched}"
191*28e9ed8bSDixsie Wolmers          >
1925e258e43Sbeccabroek            <p ng-message="required">Field is required</p>
1935e258e43Sbeccabroek          </div>
1945e258e43Sbeccabroek        </div>
1955e258e43Sbeccabroek      </form>
1965e258e43Sbeccabroek      <div class="form-actions">
197*28e9ed8bSDixsie Wolmers        <button
198*28e9ed8bSDixsie Wolmers          type="button"
199*28e9ed8bSDixsie Wolmers          class="btn btn-primary"
200*28e9ed8bSDixsie Wolmers          ng-class="{'disabled' : add__group__form.$invalid}"
201*28e9ed8bSDixsie Wolmers          ng-click="addRoleGroup(); $parent.addGroup=false; $parent.newGroup={}"
202*28e9ed8bSDixsie Wolmers        >
2035e258e43Sbeccabroek          Save
2045e258e43Sbeccabroek        </button>
205*28e9ed8bSDixsie Wolmers        <button
206*28e9ed8bSDixsie Wolmers          type="button"
207*28e9ed8bSDixsie Wolmers          class="btn btn-secondary"
208*28e9ed8bSDixsie Wolmers          ng-click="$parent.addGroup=false; $parent.newGroup={}"
209*28e9ed8bSDixsie Wolmers        >
2105e258e43Sbeccabroek          Cancel
2115e258e43Sbeccabroek        </button>
2125e258e43Sbeccabroek      </div>
2135e258e43Sbeccabroek    </div>
214*28e9ed8bSDixsie 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>
223*28e9ed8bSDixsie Wolmers          <select
224*28e9ed8bSDixsie Wolmers            id="group__role__edit"
225*28e9ed8bSDixsie Wolmers            name="group__role__edit"
226*28e9ed8bSDixsie Wolmers            ng-model="newGroup.LocalRole"
227*28e9ed8bSDixsie Wolmers            required
228*28e9ed8bSDixsie Wolmers          >
2295e258e43Sbeccabroek            <option class="courier-bold" ng-repeat="privilege in privileges">{{
2305e258e43Sbeccabroek              privilege
2315e258e43Sbeccabroek            }}</option>
2325e258e43Sbeccabroek          </select>
233*28e9ed8bSDixsie Wolmers          <div
234*28e9ed8bSDixsie Wolmers            ng-messages="edit__group__form.group__role__edit.$error"
235*28e9ed8bSDixsie Wolmers            class="form-error"
236*28e9ed8bSDixsie Wolmers            ng-class="{'visible' : edit__group__form.group__role__edit.$touched}"
237*28e9ed8bSDixsie Wolmers          >
2385e258e43Sbeccabroek            <p ng-message="required">Field is required</p>
2395e258e43Sbeccabroek          </div>
2405e258e43Sbeccabroek        </div>
2415e258e43Sbeccabroek      </form>
2425e258e43Sbeccabroek      <div class="form-actions">
243*28e9ed8bSDixsie Wolmers        <button
244*28e9ed8bSDixsie Wolmers          type="button"
245*28e9ed8bSDixsie Wolmers          class="btn btn-primary"
246*28e9ed8bSDixsie Wolmers          ng-click="editRoleGroup();$parent.editGroup=false; $parent.newGroup={}"
247*28e9ed8bSDixsie Wolmers        >
2485e258e43Sbeccabroek          Save
2495e258e43Sbeccabroek        </button>
250*28e9ed8bSDixsie Wolmers        <button
251*28e9ed8bSDixsie Wolmers          type="button"
252*28e9ed8bSDixsie Wolmers          class="btn btn-secondary"
253*28e9ed8bSDixsie Wolmers          ng-click="$parent.editGroup=false; $parent.newGroup={}"
254*28e9ed8bSDixsie Wolmers        >
2555e258e43Sbeccabroek          Cancel
2565e258e43Sbeccabroek        </button>
2575e258e43Sbeccabroek      </div>
2585e258e43Sbeccabroek    </div>
2595e258e43Sbeccabroek  </div>
2605e258e43Sbeccabroek</section>
261*28e9ed8bSDixsie Wolmers<!-- Remove Role Groups Modal -->
262*28e9ed8bSDixsie Wolmers<section
263*28e9ed8bSDixsie Wolmers  class="modal"
264*28e9ed8bSDixsie Wolmers  role="dialog"
265*28e9ed8bSDixsie Wolmers  aria-labelledby="remove-role-group"
266*28e9ed8bSDixsie Wolmers  ng-class="{'active': removeGroup}"
267*28e9ed8bSDixsie Wolmers>
268*28e9ed8bSDixsie 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">
273*28e9ed8bSDixsie Wolmers    <button
274*28e9ed8bSDixsie Wolmers      type="button"
275*28e9ed8bSDixsie Wolmers      class="btn btn-primary"
276*28e9ed8bSDixsie Wolmers      ng-click="removeRoleGroup(); $parent.removeGroup=false; newGroup={}"
277*28e9ed8bSDixsie Wolmers    >
2785e258e43Sbeccabroek      Remove
2795e258e43Sbeccabroek    </button>
280*28e9ed8bSDixsie Wolmers    <button
281*28e9ed8bSDixsie Wolmers      type="button"
282*28e9ed8bSDixsie Wolmers      class="btn btn-secondary"
283*28e9ed8bSDixsie Wolmers      ng-click="removeGroup=false; $parent.removeGroup=false; newGroup={}"
284*28e9ed8bSDixsie Wolmers    >
2855e258e43Sbeccabroek      Cancel
2865e258e43Sbeccabroek    </button>
2875e258e43Sbeccabroek  </div>
2885e258e43Sbeccabroek</section>
289*28e9ed8bSDixsie Wolmers<!-- Remove Multiple Role Groups Modal -->
290*28e9ed8bSDixsie Wolmers<section
291*28e9ed8bSDixsie Wolmers  class="modal"
292*28e9ed8bSDixsie Wolmers  role="dialog"
293*28e9ed8bSDixsie Wolmers  ng-class="{'active': removeMultipleGroups}"
294*28e9ed8bSDixsie 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
301*28e9ed8bSDixsie Wolmers      <span ng-repeat="groups in roleGroups | filter:{isSelected:true}"
302*28e9ed8bSDixsie Wolmers        >{{ $last && !$first ? " and " : $first ? "" : ", "
303*28e9ed8bSDixsie Wolmers        }}{{ "'" + groups.RemoteGroup + "'" }}?</span
304*28e9ed8bSDixsie Wolmers      >
3055e258e43Sbeccabroek    </p>
3065e258e43Sbeccabroek  </div>
3075e258e43Sbeccabroek  <div class="form-actions">
308*28e9ed8bSDixsie Wolmers    <button
309*28e9ed8bSDixsie Wolmers      type="button"
310*28e9ed8bSDixsie Wolmers      class="btn btn-primary"
311*28e9ed8bSDixsie Wolmers      ng-click="removeMultipleRoleGroups();$parent.removeMultipleGroups=false; $parent.newGroup={}"
312*28e9ed8bSDixsie Wolmers    >
3135e258e43Sbeccabroek      Remove
3145e258e43Sbeccabroek    </button>
315*28e9ed8bSDixsie Wolmers    <button
316*28e9ed8bSDixsie Wolmers      type="button"
317*28e9ed8bSDixsie Wolmers      class="btn btn-secondary"
318*28e9ed8bSDixsie Wolmers      ng-click="removeMultipleGroups = false"
319*28e9ed8bSDixsie Wolmers    >
3205e258e43Sbeccabroek      Cancel
3215e258e43Sbeccabroek    </button>
3225e258e43Sbeccabroek  </div>
3235e258e43Sbeccabroek</section>
324*28e9ed8bSDixsie Wolmers<div
325*28e9ed8bSDixsie Wolmers  class="modal-overlay"
326*28e9ed8bSDixsie Wolmers  tabindex="-1"
327*28e9ed8bSDixsie Wolmers  ng-class="{'active': addGroup || editGroup || removeGroup || removeMultipleGroups}"
328*28e9ed8bSDixsie Wolmers></div>
329