1 <md-dialog class="inboundroute-dialog" aria-label="New InboundRoute">
2 <form name="inboundrouteFormApp" class="md-inline-form" novalidate>
3 <md-toolbar class="md-accent md-hue-2">
5 class="md-toolbar-tools"
7 layout-align="space-between center"
9 <span class="title">{{ vm.title | translate }}</span>
10 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
12 md-font-icon="icon-close"
13 aria-label="Close dialog"
19 <md-dialog-content ms-scroll>
20 <div class="error-list">
22 ng-repeat="error in vm.errors"
25 layout-align="space-between center"
28 <span class="message">{{error.message}}</span>
29 <span class="type">({{error.type}})</span>
31 <md-button class="md-icon-button">
33 md-font-icon="icon-alert-box"
34 aria-label="alert error"
40 <md-input-container class="md-block">
41 <label translate="VOICE.QUEUE">Queue</label>
44 ng-model="vm.queue.queue"
47 ng-disabled="!vm.crudPermissions.canEdit"
51 ng-repeat="queue in vm.queues"
52 ng-disabled="queue.canSelect === false"
53 >{{ queue.name }}</md-option
57 ng-messages="inboundrouteFormApp['queue'].$error"
58 ng-show="inboundrouteFormApp['queue'].$touched"
61 <div ng-message="required">
62 <span translate="VOICE.ERRORS.QUEUE_REQUIRED"
63 >Queue field is required</span
68 <md-input-container class="md-block">
69 <label translate="VOICE.OPTIONS">Options</label>
73 ng-model="vm.queue.options"
74 ng-disabled="!vm.crudPermissions.canEdit"
78 ng-messages="inboundrouteFormApp['options'].$error"
79 ng-show="inboundrouteFormApp['options'].$touched"
82 <div ng-message="required">
83 <span translate="VOICE.ERRORS.OPTIONS_REQUIRED"
84 >Options field is required</span
89 <md-input-container class="md-block">
90 <label translate="VOICE.URL">Url</label>
94 ng-model="vm.queue.URL"
95 ng-disabled="!vm.crudPermissions.canEdit"
99 ng-messages="inboundrouteFormApp['URL'].$error"
100 ng-show="inboundrouteFormApp['URL'].$touched"
103 <div ng-message="required">
104 <span translate="VOICE.ERRORS.URL_REQUIRED"
105 >Url field is required</span
109 </md-input-container>
110 <md-input-container class="md-block">
111 <label translate="VOICE.ANNOUNCE_OVERRIDES">Announce_Overrides</label>
114 ng-model="vm.queue.sound"
115 ng-disabled="!vm.crudPermissions.canEdit"
117 <md-option ng-value="''">None</md-option>
119 ng-value="'/var/opt/motion2/server/files/sounds/converted/{{sound.save_name}}'"
120 ng-repeat="sound in vm.sounds"
121 ng-disabled="sound.canSelect === false"
122 >{{ sound.name }}</md-option
126 ng-messages="inboundrouteFormApp['sound'].$error"
127 ng-show="inboundrouteFormApp['sound'].$touched"
130 <div ng-message="required">
131 <span translate="VOICE.ERRORS.ANNOUNCE_OVERRIDES_REQUIRED"
132 >Announce_Overrides field is required</span
136 </md-input-container>
137 <md-input-container class="md-block">
138 <label translate="VOICE.TIMEOUT">Timeout</label>
142 ng-model="vm.queue.timeout"
144 ng-disabled="!vm.crudPermissions.canEdit"
148 ng-messages="inboundrouteFormApp['timeout'].$error"
149 ng-show="inboundrouteFormApp['timeout'].$touched"
152 <div ng-message="required">
153 <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED"
154 >Timeout field is required</span
157 <div ng-message="min">
159 translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
160 >Timeout must be a valid greater or equal than</span
165 </md-input-container>
166 <md-input-container class="md-block">
167 <label translate="VOICE.AGI">Agi</label>
171 ng-model="vm.queue.agi"
172 ng-disabled="!vm.crudPermissions.canEdit"
176 ng-messages="inboundrouteFormApp['agi'].$error"
177 ng-show="inboundrouteFormApp['agi'].$touched"
180 <div ng-message="required">
181 <span translate="VOICE.ERRORS.AGI_REQUIRED"
182 >Agi field is required</span
186 </md-input-container>
187 <md-input-container class="md-block">
188 <label translate="VOICE.MACRO">Macro</label>
192 ng-model="vm.queue.macro"
193 ng-disabled="!vm.crudPermissions.canEdit"
197 ng-messages="inboundrouteFormApp['macro'].$error"
198 ng-show="inboundrouteFormApp['macro'].$touched"
201 <div ng-message="required">
202 <span translate="VOICE.ERRORS.MACRO_REQUIRED"
203 >Macro field is required</span
207 </md-input-container>
208 <md-input-container class="md-block">
209 <label translate="VOICE.GOSUB">GoSub</label>
213 ng-model="vm.queue.gosub"
214 ng-disabled="!vm.crudPermissions.canEdit"
218 ng-messages="inboundrouteFormApp['gosub'].$error"
219 ng-show="inboundrouteFormApp['gosub'].$touched"
222 <div ng-message="required">
223 <span translate="VOICE.ERRORS.GOSUB_REQUIRED"
224 >GoSub field is required</span
228 </md-input-container>
229 <md-input-container class="md-block">
230 <label translate="VOICE.RULE">Rule</label>
234 ng-model="vm.queue.rule"
235 ng-disabled="!vm.crudPermissions.canEdit"
239 ng-messages="inboundrouteFormApp['rule'].$error"
240 ng-show="inboundrouteFormApp['rule'].$touched"
243 <div ng-message="required">
244 <span translate="VOICE.ERRORS.RULE_REQUIRED"
245 >Rule field is required</span
249 </md-input-container>
250 <md-input-container class="md-block">
251 <label translate="VOICE.POSITION">Position</label>
255 ng-model="vm.queue.position"
257 ng-disabled="!vm.crudPermissions.canEdit"
261 ng-messages="inboundrouteFormApp['position'].$error"
262 ng-show="inboundrouteFormApp['position'].$touched"
265 <div ng-message="required">
266 <span translate="VOICE.ERRORS.POSITION_REQUIRED"
267 >Position field is required</span
270 <div ng-message="min">
272 translate="VOICE.ERRORS.POSITION_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
273 >Position must be a valid greater or equal than</span
278 </md-input-container>
279 <md-input-container class="md-block">
281 ng-model="vm.queue.answer"
283 ng-disabled="!vm.crudPermissions.canEdit"
284 ><span translate="VOICE.ANSWER">Answer</span></md-switch
286 </md-input-container>
288 <div class="error-list">
290 ng-repeat="error in vm.errors"
293 layout-align="space-between center"
296 <span class="message">{{error.message}}</span>
297 <span class="type">({{error.type}})</span>
299 <md-button class="md-icon-button">
301 md-font-icon="icon-alert-box"
302 aria-label="alert error"
310 <md-dialog-actions layout="row" layout-align="space-between center">
313 layout-align="start center"
314 ng-if="vm.crudPermissions.canEdit"
318 ng-click="vm.saveInboundRouteApp()"
319 class="send-button md-accent md-raised"
320 ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine"
322 translate="VOICE.SAVE"
323 translate-attr-aria-label="VOICE.SAVE"