1 <md-dialog class="userProfile-dialog" aria-label="userProfile">
2 <form name="userProfileForm" ng-cloak>
4 <div class="md-toolbar-tools">
7 <md-button class="md-icon-button" ng-click="vm.closeDialog($event)">
9 md-font-icon="icon-close"
10 aria-label="Close dialog"
16 <div layout="column" class="padding-bottom-10">
17 <div layout="row" class="padding-bottom-10">
18 <md-input-container flex class="no-margin">
19 <label translate="STAFF.SECTIONS">Sections</label>
22 ng-model="vm.selectedSection"
23 placeholder="{{'STAFF.PERMISSIONS_SELECT_SECTION' | translate}}"
24 ng-change="vm.onChangeSection()"
29 ng-repeat="subsection in vm.subsections"
30 ng-selected="{{vm.subsections.length === 1 ? 'true' : 'false'}}"
31 >{{subsection.translate | translate}}</md-option
35 <div layout="row" ng-show="vm.selectedSection" class="margin-left-10">
37 ng-switch="vm.selectedSection.enabled"
38 class="md-icon-button md-fab md-mini size-8 padding-10"
39 ng-class="vm.selectedSection.enabled ? 'blue-500-bg' : 'grey-A400-bg'"
40 ng-click="vm.onChangeVisibility()"
41 aria-label="Visibility"
45 md-font-icon="icon-eye"
46 aria-label="Visible section"
49 >{{'STAFF.PERMISSIONS_SECTION_HIDE' | translate}}</md-tooltip
53 ng-switch-when="false"
54 md-font-icon="icon-eye-off"
55 aria-label="Hidden section"
58 >{{'STAFF.PERMISSIONS_SECTION_SHOW' | translate}}</md-tooltip
64 class="md-icon-button md-fab md-mini size-8 green-A700-bg no-margin"
68 md-font-icon="icon-monitor"
69 class="md-background-fg"
70 aria-label="Read permission"
73 >{{'STAFF.READ_PERMISSION' | translate}}</md-tooltip
78 class="md-icon-button md-fab md-mini size-8 no-margin"
79 ng-class="vm.selectedSection.allowEdit ? 'green-A700-bg' : 'grey-A400-bg'"
80 ng-click="vm.setPermission('edit')"
83 md-font-icon="icon-pencil"
84 aria-label="Edit permission"
87 >{{'STAFF.EDIT_PERMISSION' | translate}}</md-tooltip
92 class="md-icon-button md-fab md-mini size-8 no-margin"
93 ng-class="vm.selectedSection.allowDelete ? 'green-A700-bg' : 'grey-A400-bg'"
94 ng-click="vm.setPermission('delete')"
97 md-font-icon="icon-delete"
98 aria-label="Delete permission"
101 >{{'STAFF.DELETE_PERMISSION' | translate}}</md-tooltip
110 ng-show="vm.selectedSection"
111 class="margin-left-10"
112 ng-if="!vm.selectedSection.permissions || vm.selectedSection.permissions.association"
115 ng-model="vm.selectedSection.autoAssociation"
116 class="no-margin padding-right-10"
117 aria-label="Auto association"
118 ng-change="vm.onChangeAutoAssociation()"
121 <p class="no-margin font-size-12 line-height-30">
122 {{'STAFF.PERMISSIONS_AUTO_ASSOCIATION_INFO' | translate}}
127 ng-show="vm.selectedSection && vm.selectedSection.title === 'Reports' && !vm.selectedSection.autoAssociation"
128 class="margin-bottom-10 margin-top-30"
129 ng-if="!vm.selectedSection.permissions || vm.selectedSection.permissions.association"
131 <md-input-container flex class="no-margin">
132 <label translate="STAFF.REPORT_TYPE">Report Type</label>
135 ng-model="vm.selectedSection.reportType"
136 placeholder="{{'STAFF.PERMISSIONS_SELECT_REPORT_TYPE' | translate}}"
137 ng-change="vm.onChangeReportType()"
140 <md-option ng-value="'default'">Default</md-option>
141 <md-option ng-value="'custom'">Custom</md-option>
143 </md-input-container>
146 ng-show="vm.selectedSection && vm.selectedSection.title === 'Dashboards'"
147 class="user-profile-section-help margin-bottom-10 margin-top-20"
150 md-font-icon="icon-help"
151 aria-label="Dashboards help"
154 class="no-margin font-size-12 line-height-30"
155 translate="STAFF.HELP.CUSTOM_DASHBOARDS_PERMISSIONS"
160 options="vm.dualMultiselectOptions"
161 ng-if="!vm.selectedSection.permissions || vm.selectedSection.permissions.association"
162 ng-hide="vm.selectedSection.autoAssociation"
163 ></ms-dual-multiselect>
165 <md-dialog-actions layout="row" layout-align="end center">
168 md-font-icon="icon-information-outline"
169 aria-label="Delete permission"
172 class="no-margin font-size-12 line-height-30"
173 translate="STAFF.HELP.SAVE_PERMISSIONS"
177 layout-align="end center"
179 ng-click="vm.saveSection()"
180 class="send-button md-accent md-raised"
181 ng-disabled="!vm.pendingChanges"
183 translate="STAFF.SAVE"
184 translate-attr-aria-label="STAFF.SAVE"