63667eced6925c6317da3efd158bfe067b3e0403
[motion-next.git] /
1 <md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">
2   <form name="chatWebsiteFormApp" class="md-inline-form" novalidate>
3     <md-toolbar class="md-accent md-hue-2">
4       <div
5         class="md-toolbar-tools"
6         layout="row"
7         layout-align="space-between center"
8       >
9         <span class="title">{{ vm.title | translate }}</span>
10         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
11           <md-icon
12             md-font-icon="icon-close"
13             aria-label="Close dialog"
14           ></md-icon>
15         </md-button>
16       </div>
17     </md-toolbar>
18
19     <md-dialog-content ms-scroll>
20       <div class="error-list">
21         <div
22           ng-repeat="error in vm.errors"
23           class="error"
24           layout="row"
25           layout-align="space-between center"
26         >
27           <div>
28             <span class="message">{{error.message}}</span>
29             <span class="type">({{error.type}})</span>
30           </div>
31           <md-button class="md-icon-button">
32             <md-icon
33               md-font-icon="icon-alert-box"
34               aria-label="alert error"
35               class="s16"
36             ></md-icon>
37           </md-button>
38         </div>
39       </div>
40       <md-input-container class="md-block">
41         <label translate="CHAT.QUEUE">Queue</label>
42         <md-select
43           name="queue"
44           ng-model="vm.queue.queue"
45           autofocus
46           required
47           ng-disabled="!vm.crudPermissions.canEdit"
48         >
49           <md-option
50             ng-value="queue.name"
51             ng-repeat="queue in vm.queues"
52             ng-disabled="queue.canSelect === false"
53             >{{ queue.name }}</md-option
54           >
55         </md-select>
56         <div
57           ng-messages="chatWebsiteFormApp['queue'].$error"
58           ng-show="chatWebsiteFormApp['queue'].$touched"
59           role="alert"
60         >
61           <div ng-message="required">
62             <span translate="CHAT.ERRORS.QUEUE_REQUIRED"
63               >Queue field is required</span
64             >
65           </div>
66         </div>
67       </md-input-container>
68       <md-input-container class="md-block">
69         <label translate="CHAT.TIMEOUT">Timeout</label>
70         <input
71           type="number"
72           name="timeout"
73           ng-model="vm.queue.timeout"
74           min="0"
75           max="2147483"
76           ng-required="true"
77           ng-disabled="!vm.crudPermissions.canEdit"
78         />
79
80         <div
81           ng-messages="chatWebsiteFormApp['timeout'].$error"
82           ng-show="chatWebsiteFormApp['timeout'].$touched"
83           role="alert"
84         >
85           <div ng-message="required">
86             <span translate="CHAT.ERRORS.TIMEOUT_REQUIRED"
87               >Timeout field is required</span
88             >
89           </div>
90           <div ng-message="min">
91             <span
92               translate="CHAT.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
93               >Timeout must be a valid greater or equal than</span
94             >
95             <span>0</span>
96           </div>
97           <div ng-message="max">
98             <span translate="CHAT.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO"
99               >Timeout must be a valid greater or equal than</span
100             >
101             <span>2147483</span>
102           </div>
103         </div>
104       </md-input-container>
105
106       <div class="error-list">
107         <div
108           ng-repeat="error in vm.errors"
109           class="error"
110           layout="row"
111           layout-align="space-between center"
112         >
113           <div>
114             <span class="message">{{error.message}}</span>
115             <span class="type">({{error.type}})</span>
116           </div>
117           <md-button class="md-icon-button">
118             <md-icon
119               md-font-icon="icon-alert-box"
120               aria-label="alert error"
121               class="s16"
122             ></md-icon>
123           </md-button>
124         </div>
125       </div>
126     </md-dialog-content>
127
128     <md-dialog-actions layout="row" layout-align="space-between center">
129       <div
130         layout="row"
131         layout-align="start center"
132         ng-if="vm.crudPermissions.canEdit"
133       >
134         <md-button
135           type="submit"
136           ng-click="vm.saveChatWebsiteApp()"
137           class="send-button md-accent md-raised"
138           ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine"
139           aria-label="SAVE"
140           translate="CHAT.SAVE"
141           translate-attr-aria-label="CHAT.SAVE"
142         >
143           SAVE
144         </md-button>
145       </div>
146     </md-dialog-actions>
147   </form>
148 </md-dialog>