d68d38e1ea48917ae80518a68dfafc0e044be7d7
[motion-next.git] /
1 <md-dialog
2   class="zendeskConfiguration-dialog"
3   aria-label="New ZendeskConfiguration"
4 >
5   <form name="zendeskConfigurationForm" class="md-inline-form" novalidate>
6     <md-toolbar class="md-accent md-hue-2">
7       <div
8         class="md-toolbar-tools"
9         layout="row"
10         layout-align="space-between center"
11       >
12         <span class="title">{{ vm.title | translate }}</span>
13         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
14           <md-icon
15             md-font-icon="icon-close"
16             aria-label="Close dialog"
17           ></md-icon>
18         </md-button>
19       </div>
20     </md-toolbar>
21
22     <md-dialog-content ms-scroll>
23       <div class="error-list">
24         <div
25           ng-repeat="error in vm.errors"
26           class="error"
27           layout="row"
28           layout-align="space-between center"
29         >
30           <div>
31             <span class="message">{{error.message}}</span>
32             <span class="type">({{error.type}})</span>
33           </div>
34           <md-button class="md-icon-button">
35             <md-icon
36               md-font-icon="icon-alert-box"
37               aria-label="alert error"
38               class="s16"
39             ></md-icon>
40           </md-button>
41         </div>
42       </div>
43       <md-input-container class="md-block">
44         <label translate="INTEGRATIONS.NAME">Name</label>
45         <input
46           type=""
47           name="name"
48           ng-model="vm.zendeskConfiguration.name"
49           ng-required="true"
50           autofocus
51         />
52
53         <div
54           ng-messages="zendeskConfigurationForm['name'].$error"
55           ng-show="zendeskConfigurationForm['name'].$touched"
56           role="alert"
57         >
58           <div ng-message="required">
59             <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
60               >Name field is required</span
61             >
62           </div>
63         </div>
64       </md-input-container>
65       <md-input-container class="md-block">
66         <label translate="INTEGRATIONS.CHANNEL">Channel</label>
67         <md-select
68           name="channel"
69           ng-model="vm.zendeskConfiguration.channel"
70           required
71         >
72           <md-option ng-value="'voice'">
73             {{ 'INTEGRATIONS.VOICE' | translate }}
74           </md-option>
75         </md-select>
76         <div
77           ng-messages="zendeskConfigurationForm['channel'].$error"
78           ng-show="zendeskConfigurationForm['channel'].$touched"
79           role="alert"
80         >
81           <div ng-message="required">
82             <span translate="INTEGRATIONS.ERRORS.CHANNEL_REQUIRED"
83               >Channel field is required</span
84             >
85           </div>
86         </div>
87       </md-input-container>
88       <md-input-container class="md-block">
89         <label translate="INTEGRATIONS.TYPE">Type</label>
90         <md-select name="type" ng-model="vm.zendeskConfiguration.type" required>
91           <md-option ng-value="'inbound'">
92             {{ 'INTEGRATIONS.INBOUND_IN_QUEUE' | translate }}
93           </md-option>
94
95           <md-option ng-value="'outbound'">
96             {{ 'INTEGRATIONS.OUTBOUND_CALL' | translate }}
97           </md-option>
98         </md-select>
99         <div
100           ng-messages="zendeskConfigurationForm['type'].$error"
101           ng-show="zendeskConfigurationForm['type'].$touched"
102           role="alert"
103         >
104           <div ng-message="required">
105             <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED"
106               >Type field is required</span
107             >
108           </div>
109         </div>
110       </md-input-container>
111
112       <div class="error-list">
113         <div
114           ng-repeat="error in vm.errors"
115           class="error"
116           layout="row"
117           layout-align="space-between center"
118         >
119           <div>
120             <span class="message">{{error.message}}</span>
121             <span class="type">({{error.type}})</span>
122           </div>
123           <md-button class="md-icon-button">
124             <md-icon
125               md-font-icon="icon-alert-box"
126               aria-label="alert error"
127               class="s16"
128             ></md-icon>
129           </md-button>
130         </div>
131       </div>
132     </md-dialog-content>
133
134     <md-dialog-actions
135       layout="row"
136       layout-align="space-between center"
137       ng-if="!vm.crudPermissions.readOnly"
138     >
139       <div layout="row" layout-align="start center">
140         <md-button
141           type="submit"
142           ng-if="vm.crudPermissions.canEdit && !vm.newZendeskConfiguration"
143           ng-click="vm.saveZendeskConfiguration()"
144           class="send-button md-accent md-raised"
145           ng-disabled="zendeskConfigurationForm.$invalid || zendeskConfigurationForm.$pristine"
146           aria-label="SAVE"
147           translate="INTEGRATIONS.SAVE"
148           translate-attr-aria-label="INTEGRATIONS.SAVE"
149         >
150           SAVE
151         </md-button>
152
153         <md-button
154           type="submit"
155           ng-if="vm.crudPermissions.canEdit && vm.newZendeskConfiguration"
156           ng-click="vm.addNewZendeskConfiguration()"
157           class="send-button md-accent md-raised"
158           ng-disabled="zendeskConfigurationForm.$invalid"
159           aria-label="ADD"
160           translate="INTEGRATIONS.ADD_ZENDESKCONFIGURATION"
161           translate-attr-aria-label="INTEGRATIONS.ADD_ZENDESKCONFIGURATION"
162         >
163           ADD ZENDESKCONFIGURATION
164         </md-button>
165       </div>
166       <div layout="row">
167         <md-button
168           class="md-icon-button"
169           ng-if="vm.crudPermissions.canDelete && !vm.newZendeskConfiguration"
170           ng-click="vm.deleteZendeskConfiguration($event)"
171           aria-label="DELETE"
172           translate
173           translate-attr-aria-label="INTEGRATIONS.DELETE"
174         >
175           <md-icon md-font-icon="icon-delete"></md-icon>
176           <md-tooltip
177             ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip
178           >
179         </md-button>
180       </div>
181     </md-dialog-actions>
182   </form>
183 </md-dialog>