22d34042051248d95a1c37630f475533b8ec7e60
[motion-next.git] /
1 <md-dialog
2   class="openchannelAccount-dialog"
3   aria-label="New OpenchannelAccount"
4 >
5   <form name="openchannelAccountFormApp" 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="OPENCHANNEL.QUEUE">Queue</label>
45         <md-select
46           name="queue"
47           ng-model="vm.queue.queue"
48           autofocus
49           required
50           ng-disabled="!vm.crudPermissions.canEdit"
51         >
52           <md-option
53             ng-value="queue.name"
54             ng-repeat="queue in vm.queues"
55             ng-disabled="queue.canSelect === false"
56             >{{ queue.name }}</md-option
57           >
58         </md-select>
59         <div
60           ng-messages="openchannelAccountFormApp['queue'].$error"
61           ng-show="openchannelAccountFormApp['queue'].$touched"
62           role="alert"
63         >
64           <div ng-message="required">
65             <span translate="OPENCHANNEL.ERRORS.QUEUE_REQUIRED"
66               >Queue field is required</span
67             >
68           </div>
69         </div>
70       </md-input-container>
71       <md-input-container class="md-block">
72         <label translate="OPENCHANNEL.TIMEOUT">Timeout</label>
73         <input
74           type="number"
75           name="timeout"
76           ng-model="vm.queue.timeout"
77           min="0"
78           max="2147483"
79           ng-required="true"
80           ng-disabled="!vm.crudPermissions.canEdit"
81         />
82
83         <div
84           ng-messages="openchannelAccountFormApp['timeout'].$error"
85           ng-show="openchannelAccountFormApp['timeout'].$touched"
86           role="alert"
87         >
88           <div ng-message="required">
89             <span translate="OPENCHANNEL.ERRORS.TIMEOUT_REQUIRED"
90               >Timeout field is required</span
91             >
92           </div>
93           <div ng-message="min">
94             <span
95               translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
96               >Timeout must be a valid greater or equal than</span
97             >
98             <span>0</span>
99           </div>
100           <div ng-message="max">
101             <span
102               translate="OPENCHANNEL.ERRORS.TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO"
103               >Timeout must be a valid greater or equal than</span
104             >
105             <span>2147483</span>
106           </div>
107         </div>
108       </md-input-container>
109
110       <div class="error-list">
111         <div
112           ng-repeat="error in vm.errors"
113           class="error"
114           layout="row"
115           layout-align="space-between center"
116         >
117           <div>
118             <span class="message">{{error.message}}</span>
119             <span class="type">({{error.type}})</span>
120           </div>
121           <md-button class="md-icon-button">
122             <md-icon
123               md-font-icon="icon-alert-box"
124               aria-label="alert error"
125               class="s16"
126             ></md-icon>
127           </md-button>
128         </div>
129       </div>
130     </md-dialog-content>
131
132     <md-dialog-actions layout="row" layout-align="space-between center">
133       <div
134         layout="row"
135         layout-align="start center"
136         ng-if="vm.crudPermissions.canEdit"
137       >
138         <md-button
139           type="submit"
140           ng-click="vm.saveOpenchannelAccountApp()"
141           class="send-button md-accent md-raised"
142           ng-disabled="openchannelAccountFormApp.$invalid || openchannelAccountFormApp.$pristine"
143           aria-label="SAVE"
144           translate="OPENCHANNEL.SAVE"
145           translate-attr-aria-label="OPENCHANNEL.SAVE"
146         >
147           SAVE
148         </md-button>
149       </div>
150     </md-dialog-actions>
151   </form>
152 </md-dialog>