1*5e258e43Sbeccabroek<div class="row column">
2*5e258e43Sbeccabroek  <button type="button" ng-class="{'disabled' : roleGroupType === '' }" ng-disabled="roleGroupType === ''"
3*5e258e43Sbeccabroek    class="btn btn-tertiary" ng-click="addGroupFn(); $parent.newGroup={}">
4*5e258e43Sbeccabroek    <icon aria-hidden="true" file="icon-plus.svg"></icon>
5*5e258e43Sbeccabroek    <span>Add role group</span>
6*5e258e43Sbeccabroek  </button>
7*5e258e43Sbeccabroek  <button type="button" ng-disabled="roleGroupType === '' || !hasSelectedGroup" class="btn btn-tertiary"
8*5e258e43Sbeccabroek    ng-click="removeMultipleRoleGroupsFn() ">
9*5e258e43Sbeccabroek    <icon aria-hidden="true" file="icon-trashcan.svg"></icon>
10*5e258e43Sbeccabroek    <span>Remove role groups</span>
11*5e258e43Sbeccabroek  </button>
12*5e258e43Sbeccabroek</div>
13*5e258e43Sbeccabroek<div class="ldap__table">
14*5e258e43Sbeccabroek  <div class="table__row-header row column" ng-class="{'disabled' : !enabled }">
15*5e258e43Sbeccabroek    <div class="row column">
16*5e258e43Sbeccabroek      <div class="table__cell-select">
17*5e258e43Sbeccabroek        <label class="control-check" aria-label="select or deselect all groups">
18*5e258e43Sbeccabroek          <input type="checkbox" ng-disabled="!enabled || roleGroups.length < 1 " name="events__check"
19*5e258e43Sbeccabroek            ng-click="toggleAll()" ng-checked="roleGroupIsSelectedChanged()" ng-model="all" />
20*5e258e43Sbeccabroek          <span class="control__indicator"></span>
21*5e258e43Sbeccabroek        </label>
22*5e258e43Sbeccabroek      </div>
23*5e258e43Sbeccabroek      <div class="table__cell-sort">
24*5e258e43Sbeccabroek        <div class="column small-2 sort_button_wrapper">
25*5e258e43Sbeccabroek          <button class="sort-ascending" ng-click="sortBy('RemoteGroup', false)"></button>
26*5e258e43Sbeccabroek          <button class="sort-descending" ng-click="sortBy('RemoteGroup', true)"></button>
27*5e258e43Sbeccabroek        </div>
28*5e258e43Sbeccabroek      </div>
29*5e258e43Sbeccabroek      <div class="table__cell-ldap-group">
30*5e258e43Sbeccabroek        Group name
31*5e258e43Sbeccabroek      </div>
32*5e258e43Sbeccabroek      <div class="table__cell-sort">
33*5e258e43Sbeccabroek        <div class="column small-2 sort_button_wrapper">
34*5e258e43Sbeccabroek          <button class="sort-ascending" ng-click="sortBy('LocalRole', false)"></button>
35*5e258e43Sbeccabroek          <button class="sort-descending" ng-click="sortBy('LocalRole', true)"></button>
36*5e258e43Sbeccabroek        </div>
37*5e258e43Sbeccabroek      </div>
38*5e258e43Sbeccabroek      <div class="table__cell-ldap-role">
39*5e258e43Sbeccabroek        Group privilege
40*5e258e43Sbeccabroek      </div>
41*5e258e43Sbeccabroek    </div>
42*5e258e43Sbeccabroek  </div>
43*5e258e43Sbeccabroek  <div class="empty__logs" ng-if="roleGroups.length < 1 || !enabled">
44*5e258e43Sbeccabroek    <p ng-if="roleGroups.length < 1 && roleGroupType === 'ad' ||  roleGroupType === 'ldap'">
45*5e258e43Sbeccabroek      No role groups have been created yet.
46*5e258e43Sbeccabroek    </p>
47*5e258e43Sbeccabroek    <p ng-if=" roleGroupType === '' " ng-class="{'disabled' : !enabled }">
48*5e258e43Sbeccabroek      LDAP authentication must be enabled before creating role groups.
49*5e258e43Sbeccabroek    </p>
50*5e258e43Sbeccabroek  </div>
51*5e258e43Sbeccabroek  <div ng-repeat="group in roleGroups | orderBy:sortPropertyName:reverse track by $index ">
52*5e258e43Sbeccabroek    <div class="row column table__row-value" ng-if="enabled">
53*5e258e43Sbeccabroek      <div class="table__cell-select select-header">
54*5e258e43Sbeccabroek        <label class="control-check" aria-label="select or deselect group">
55*5e258e43Sbeccabroek          <input type="checkbox" name="events__check" ng-model="group.isSelected"
56*5e258e43Sbeccabroek            ng-change="roleGroupIsSelectedChanged(); optionToggled()" />
57*5e258e43Sbeccabroek          <span class="control__indicator"></span>
58*5e258e43Sbeccabroek        </label>
59*5e258e43Sbeccabroek      </div>
60*5e258e43Sbeccabroek      <div class="table__cell-ldap">
61*5e258e43Sbeccabroek        {{ group.RemoteGroup }}
62*5e258e43Sbeccabroek      </div>
63*5e258e43Sbeccabroek      <div class="table__cell-ldap">
64*5e258e43Sbeccabroek        {{ group.LocalRole }}
65*5e258e43Sbeccabroek      </div>
66*5e258e43Sbeccabroek      <div class="table__cell-buttons">
67*5e258e43Sbeccabroek        <button class="btn btn-tertiary" type="button" aria-label="edit selected role group"
68*5e258e43Sbeccabroek          ng-click="editGroupFn(group.RemoteGroup, group.LocalRole, $index); newGroup.RemoteGroup = group.RemoteGroup; newGroup.LocalRole = group.LocalRole; selectedGroupIndex = $index">
69*5e258e43Sbeccabroek          <icon aria-hidden="true" file="icon-edit.svg"></icon>
70*5e258e43Sbeccabroek        </button>
71*5e258e43Sbeccabroek        <button class="btn btn-tertiary" type="button" aria-label="delete selected role group"
72*5e258e43Sbeccabroek          ng-class="{'disabled' : roleGroups.length < 1}"
73*5e258e43Sbeccabroek          ng-click="removeGroupFn($index); newGroup.RemoteGroup = group.RemoteGroup; newGroup.LocalRole = group.LocalRole; selectedGroupIndex = $index">
74*5e258e43Sbeccabroek          <icon aria-hidden="true" file="icon-trashcan.svg"></icon>
75*5e258e43Sbeccabroek        </button>
76*5e258e43Sbeccabroek      </div>
77*5e258e43Sbeccabroek    </div>
78*5e258e43Sbeccabroek  </div>
79*5e258e43Sbeccabroek</div>
80*5e258e43Sbeccabroek<section class="modal" aria-hidden="true" role="dialog" ng-class="{'active': addGroup || editGroup}">
81*5e258e43Sbeccabroek  <h3 class="subhead">{{ addGroup ? "Add new role group" : "Edit group privilege" }}</h3>
82*5e258e43Sbeccabroek  <div class="modal__content-ldap">
83*5e258e43Sbeccabroek    <div ng-if="addGroup">
84*5e258e43Sbeccabroek      <form name="add__group__form" id="add__group__form" novalidate>
85*5e258e43Sbeccabroek        <div class="small-9">
86*5e258e43Sbeccabroek          <label for="group_name">Role group name</label>
87*5e258e43Sbeccabroek          <input type="text" name="group_name" id="group_name" ng-model="newGroup.RemoteGroup" required />
88*5e258e43Sbeccabroek          <div ng-messages="add__group__form.group_name.$error" class="form-error"
89*5e258e43Sbeccabroek            ng-class="{'visible' : add__group__form.group_name.$touched}">
90*5e258e43Sbeccabroek            <p ng-message="required">Field is required</p>
91*5e258e43Sbeccabroek          </div>
92*5e258e43Sbeccabroek        </div>
93*5e258e43Sbeccabroek        <div class="small-9">
94*5e258e43Sbeccabroek          <label for="group__role">Privilege</label>
95*5e258e43Sbeccabroek          <select id="group__role" class="select__group-role" name="group__role" ng-model="newGroup.LocalRole" required>
96*5e258e43Sbeccabroek            <option class="courier-bold" ng-value="">Select an option</option>
97*5e258e43Sbeccabroek            <option class="courier-bold" ng-repeat="privilege in privileges">{{
98*5e258e43Sbeccabroek              privilege
99*5e258e43Sbeccabroek            }}</option>
100*5e258e43Sbeccabroek          </select>
101*5e258e43Sbeccabroek          <div ng-messages="add__group__form.group__role.$error" class="form-error"
102*5e258e43Sbeccabroek            ng-class="{'visible' : add__group__form.group__role.$touched}">
103*5e258e43Sbeccabroek            <p ng-message="required">Field is required</p>
104*5e258e43Sbeccabroek          </div>
105*5e258e43Sbeccabroek        </div>
106*5e258e43Sbeccabroek      </form>
107*5e258e43Sbeccabroek      <div class="form-actions">
108*5e258e43Sbeccabroek        <button type="button" class="btn btn-primary" ng-class="{'disabled' : add__group__form.$invalid}"
109*5e258e43Sbeccabroek          ng-click="addRoleGroup(); $parent.addGroup=false; $parent.newGroup={}">
110*5e258e43Sbeccabroek          Save
111*5e258e43Sbeccabroek        </button>
112*5e258e43Sbeccabroek        <button type="button" class="btn btn-secondary" ng-click="$parent.addGroup=false; $parent.newGroup={}">
113*5e258e43Sbeccabroek          Cancel
114*5e258e43Sbeccabroek        </button>
115*5e258e43Sbeccabroek      </div>
116*5e258e43Sbeccabroek    </div>
117*5e258e43Sbeccabroek    <div ng-if="editGroup">
118*5e258e43Sbeccabroek      <form name="edit__group__form" id="edit__group__form" novalidate>
119*5e258e43Sbeccabroek        <label>Role group name</label>
120*5e258e43Sbeccabroek        <div class="small-9 edit-group-name" ng-model="newGroup.RemoteGroup">
121*5e258e43Sbeccabroek          {{ newGroup.RemoteGroup }}
122*5e258e43Sbeccabroek        </div>
123*5e258e43Sbeccabroek        <div class="small-9">
124*5e258e43Sbeccabroek          <label for="group__role__edit">Privilege</label>
125*5e258e43Sbeccabroek          <select id="group__role__edit" name="group__role__edit" ng-model="newGroup.LocalRole" required>
126*5e258e43Sbeccabroek            <option class="courier-bold" ng-repeat="privilege in privileges">{{
127*5e258e43Sbeccabroek              privilege
128*5e258e43Sbeccabroek            }}</option>
129*5e258e43Sbeccabroek          </select>
130*5e258e43Sbeccabroek          <div ng-messages="edit__group__form.group__role__edit.$error" class="form-error"
131*5e258e43Sbeccabroek            ng-class="{'visible' : edit__group__form.group__role__edit.$touched}">
132*5e258e43Sbeccabroek            <p ng-message="required">Field is required</p>
133*5e258e43Sbeccabroek          </div>
134*5e258e43Sbeccabroek        </div>
135*5e258e43Sbeccabroek      </form>
136*5e258e43Sbeccabroek      <div class="form-actions">
137*5e258e43Sbeccabroek        <button type="button" class="btn btn-primary"
138*5e258e43Sbeccabroek          ng-click="editRoleGroup();$parent.editGroup=false; $parent.newGroup={}">
139*5e258e43Sbeccabroek          Save
140*5e258e43Sbeccabroek        </button>
141*5e258e43Sbeccabroek        <button type="button" class="btn btn-secondary" ng-click="$parent.editGroup=false; $parent.newGroup={}">
142*5e258e43Sbeccabroek          Cancel
143*5e258e43Sbeccabroek        </button>
144*5e258e43Sbeccabroek      </div>
145*5e258e43Sbeccabroek    </div>
146*5e258e43Sbeccabroek  </div>
147*5e258e43Sbeccabroek</section>
148*5e258e43Sbeccabroek<section class="modal" aria-hidden="true" role="dialog" ng-class="{'active': removeGroup}">
149*5e258e43Sbeccabroek  <h3 class="subhead">Remove role group</h3>
150*5e258e43Sbeccabroek  <div class="modal__content-ldap">
151*5e258e43Sbeccabroek    <p>Are you sure you want to remove "{{ newGroup.RemoteGroup }}"?</p>
152*5e258e43Sbeccabroek  </div>
153*5e258e43Sbeccabroek  <div class="form-actions">
154*5e258e43Sbeccabroek    <button type="button" class="btn btn-primary" ng-click="removeRoleGroup(); $parent.removeGroup=false; newGroup={}">
155*5e258e43Sbeccabroek      Remove
156*5e258e43Sbeccabroek    </button>
157*5e258e43Sbeccabroek    <button type="button" class="btn btn-secondary"
158*5e258e43Sbeccabroek      ng-click="removeGroup=false; $parent.removeGroup=false; newGroup={}">
159*5e258e43Sbeccabroek      Cancel
160*5e258e43Sbeccabroek    </button>
161*5e258e43Sbeccabroek  </div>
162*5e258e43Sbeccabroek</section>
163*5e258e43Sbeccabroek<section class="modal" aria-hidden="true" role="dialog" ng-class="{'active': removeMultipleGroups}">
164*5e258e43Sbeccabroek  <div class="page-header">
165*5e258e43Sbeccabroek    <h3>Remove role group</h3>
166*5e258e43Sbeccabroek  </div>
167*5e258e43Sbeccabroek  <div class="modal__content-ldap">
168*5e258e43Sbeccabroek    <p>
169*5e258e43Sbeccabroek      Are you sure you want to remove
170*5e258e43Sbeccabroek      <span ng-repeat="groups in roleGroups | filter:{isSelected:true}">{{ $last && !$first ? " and " : $first ? "" : ", "
171*5e258e43Sbeccabroek        }}{{ "'" + groups.RemoteGroup + "'" }}?</span>
172*5e258e43Sbeccabroek    </p>
173*5e258e43Sbeccabroek  </div>
174*5e258e43Sbeccabroek  <div class="form-actions">
175*5e258e43Sbeccabroek    <button type="button" class="btn btn-primary"
176*5e258e43Sbeccabroek      ng-click="removeMultipleRoleGroups();$parent.removeMultipleGroups=false; $parent.newGroup={}">
177*5e258e43Sbeccabroek      Remove
178*5e258e43Sbeccabroek    </button>
179*5e258e43Sbeccabroek    <button type="button" class="btn btn-secondary" ng-click="removeMultipleGroups = false">
180*5e258e43Sbeccabroek      Cancel
181*5e258e43Sbeccabroek    </button>
182*5e258e43Sbeccabroek  </div>
183*5e258e43Sbeccabroek</section>
184*5e258e43Sbeccabroek<div class="modal-overlay" tabindex="-1"
185*5e258e43Sbeccabroek  ng-class="{'active': addGroup || editGroup || removeGroup || removeMultipleGroups}"></div>