44b6cef556194243668d4f04e3d02025aa7e4f4e
[motion-next.git] /
1 <md-dialog class="openchannelQueue-dialog" aria-label="New OpenchannelQueue">
2   <form name="openchannelQueueForm" 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="OPENCHANNEL.NAME">Name</label>
42         <input
43           type="text"
44           name="name"
45           ng-model="vm.openchannelQueue.name"
46           ng-pattern="/^[A-Za-z0-9\.\_]+$/i"
47           ng-required="true"
48           autofocus
49           ng-disabled="!vm.newOpenchannelQueue"
50         />
51
52         <div class="hint"><span translate="OPENCHANNEL.HELP.NAME"></span></div>
53         <div
54           ng-messages="openchannelQueueForm['name'].$error"
55           ng-show="openchannelQueueForm['name'].$touched"
56           role="alert"
57         >
58           <div ng-message="required">
59             <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED"
60               >Name field is required</span
61             >
62           </div>
63           <div ng-message="pattern">
64             <span
65               translate="OPENCHANNEL.ERRORS.NAME_MUST_VALID_PATTERN"
66               translate-values="{ regex: '/^[A-Za-z0-9\.\_]+$/i' }"
67               >Name must be valid pattern
68             </span>
69           </div>
70         </div>
71       </md-input-container>
72       <md-input-container class="md-block">
73         <label translate="OPENCHANNEL.STRATEGY">Strategy</label>
74         <md-select
75           name="strategy"
76           ng-model="vm.openchannelQueue.strategy"
77           required
78         >
79           <md-option ng-value="'beepall'">Beepall</md-option>
80           <md-option ng-value="'rrmemory'">RR Memory</md-option>
81         </md-select>
82         <div
83           ng-messages="openchannelQueueForm['strategy'].$error"
84           ng-show="openchannelQueueForm['strategy'].$touched"
85           role="alert"
86         >
87           <div ng-message="required">
88             <span translate="OPENCHANNEL.ERRORS.STRATEGY_REQUIRED"
89               >Strategy field is required</span
90             >
91           </div>
92         </div>
93       </md-input-container>
94       <md-input-container class="md-block">
95         <label translate="OPENCHANNEL.AGENT_TIMEOUT">Agent_Timeout</label>
96         <input
97           type="number"
98           name="timeout"
99           ng-model="vm.openchannelQueue.timeout"
100           min="1"
101           max="2147483"
102           ng-required="true"
103         />
104
105         <div
106           ng-messages="openchannelQueueForm['timeout'].$error"
107           ng-show="openchannelQueueForm['timeout'].$touched"
108           role="alert"
109         >
110           <div ng-message="required">
111             <span translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_REQUIRED"
112               >Agent_Timeout field is required</span
113             >
114           </div>
115           <div ng-message="min">
116             <span
117               translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
118               >Agent_Timeout must be a valid greater or equal than</span
119             >
120             <span>1</span>
121           </div>
122           <div ng-message="max">
123             <span
124               translate="OPENCHANNEL.ERRORS.AGENT_TIMEOUT_MUST_BE_LESS_THAN_OR_EQUAL_TO"
125               >Agent_Timeout must be a valid greater or equal than</span
126             >
127             <span>2147483</span>
128           </div>
129         </div>
130       </md-input-container>
131       <md-input-container class="md-block">
132         <label translate="OPENCHANNEL.DESCRIPTION">Description</label>
133         <input
134           type="text"
135           name="description"
136           ng-model="vm.openchannelQueue.description"
137         />
138
139         <div
140           ng-messages="openchannelQueueForm['description'].$error"
141           ng-show="openchannelQueueForm['description'].$touched"
142           role="alert"
143         >
144           <div ng-message="required">
145             <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED"
146               >Description field is required</span
147             >
148           </div>
149         </div>
150       </md-input-container>
151
152       <div class="error-list">
153         <div
154           ng-repeat="error in vm.errors"
155           class="error"
156           layout="row"
157           layout-align="space-between center"
158         >
159           <div>
160             <span class="message">{{error.message}}</span>
161             <span class="type">({{error.type}})</span>
162           </div>
163           <md-button class="md-icon-button">
164             <md-icon
165               md-font-icon="icon-alert-box"
166               aria-label="alert error"
167               class="s16"
168             ></md-icon>
169           </md-button>
170         </div>
171       </div>
172     </md-dialog-content>
173
174     <md-dialog-actions
175       layout="row"
176       layout-align="space-between center"
177       ng-if="!vm.crudPermissions.readOnly"
178     >
179       <div layout="row" layout-align="start center">
180         <md-button
181           type="submit"
182           ng-if="vm.crudPermissions.canEdit && !vm.newOpenchannelQueue"
183           ng-click="vm.saveOpenchannelQueue()"
184           class="send-button md-accent md-raised"
185           ng-disabled="openchannelQueueForm.$invalid || openchannelQueueForm.$pristine"
186           aria-label="SAVE"
187           translate="OPENCHANNEL.SAVE"
188           translate-attr-aria-label="OPENCHANNEL.SAVE"
189         >
190           SAVE
191         </md-button>
192
193         <md-button
194           type="submit"
195           ng-if="vm.crudPermissions.canEdit && vm.newOpenchannelQueue"
196           ng-click="vm.addNewOpenchannelQueue()"
197           class="send-button md-accent md-raised"
198           ng-disabled="openchannelQueueForm.$invalid"
199           aria-label="ADD"
200           translate="OPENCHANNEL.ADD_OPENCHANNELQUEUE"
201           translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELQUEUE"
202         >
203           ADD OPENCHANNELQUEUE
204         </md-button>
205       </div>
206       <div layout="row">
207         <md-button
208           class="md-icon-button"
209           ng-if="vm.crudPermissions.canDelete && !vm.newOpenchannelQueue"
210           ng-click="vm.deleteOpenchannelQueue($event)"
211           aria-label="DELETE"
212           translate
213           translate-attr-aria-label="OPENCHANNEL.DELETE"
214         >
215           <md-icon md-font-icon="icon-delete"></md-icon>
216           <md-tooltip
217             ><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip
218           >
219         </md-button>
220       </div>
221     </md-dialog-actions>
222   </form>
223 </md-dialog>