b1e8ae49c132f86121bebfc142dd0ec1f04377e9
[motion-next.git] /
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">
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="VOICE.TECHNOLOGY/RESOURCE">Technology/Resource</label>
42         <input
43           type="text"
44           name="tech"
45           ng-model="vm.dial.tech"
46           ng-required="true"
47           autofocus
48           ng-disabled="!vm.crudPermissions.canEdit"
49         />
50
51         <div
52           ng-messages="inboundrouteFormApp['tech'].$error"
53           ng-show="inboundrouteFormApp['tech'].$touched"
54           role="alert"
55         >
56           <div ng-message="required">
57             <span translate="VOICE.ERRORS.TECHNOLOGY/RESOURCE_REQUIRED"
58               >Technology/Resource field is required</span
59             >
60           </div>
61         </div>
62       </md-input-container>
63       <md-input-container class="md-block">
64         <label translate="VOICE.TIMEOUT">Timeout</label>
65         <input
66           type="number"
67           name="timeout"
68           ng-model="vm.dial.timeout"
69           min="0"
70           ng-disabled="!vm.crudPermissions.canEdit"
71         />
72
73         <div
74           ng-messages="inboundrouteFormApp['timeout'].$error"
75           ng-show="inboundrouteFormApp['timeout'].$touched"
76           role="alert"
77         >
78           <div ng-message="required">
79             <span translate="VOICE.ERRORS.TIMEOUT_REQUIRED"
80               >Timeout field is required</span
81             >
82           </div>
83           <div ng-message="min">
84             <span
85               translate="VOICE.ERRORS.TIMEOUT_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
86               >Timeout must be a valid greater or equal than</span
87             >
88             <span>0</span>
89           </div>
90         </div>
91       </md-input-container>
92       <md-input-container class="md-block">
93         <label translate="VOICE.OPTIONS">Options</label>
94         <input
95           type="text"
96           name="options"
97           ng-model="vm.dial.options"
98           ng-disabled="!vm.crudPermissions.canEdit"
99         />
100
101         <div
102           ng-messages="inboundrouteFormApp['options'].$error"
103           ng-show="inboundrouteFormApp['options'].$touched"
104           role="alert"
105         >
106           <div ng-message="required">
107             <span translate="VOICE.ERRORS.OPTIONS_REQUIRED"
108               >Options field is required</span
109             >
110           </div>
111         </div>
112       </md-input-container>
113       <md-input-container class="md-block">
114         <label translate="VOICE.URL">Url</label>
115         <input
116           type="text"
117           name="url"
118           ng-model="vm.dial.url"
119           ng-disabled="!vm.crudPermissions.canEdit"
120         />
121
122         <div
123           ng-messages="inboundrouteFormApp['url'].$error"
124           ng-show="inboundrouteFormApp['url'].$touched"
125           role="alert"
126         >
127           <div ng-message="required">
128             <span translate="VOICE.ERRORS.URL_REQUIRED"
129               >Url field is required</span
130             >
131           </div>
132         </div>
133       </md-input-container>
134
135       <div class="error-list">
136         <div
137           ng-repeat="error in vm.errors"
138           class="error"
139           layout="row"
140           layout-align="space-between center"
141         >
142           <div>
143             <span class="message">{{error.message}}</span>
144             <span class="type">({{error.type}})</span>
145           </div>
146           <md-button class="md-icon-button">
147             <md-icon
148               md-font-icon="icon-alert-box"
149               aria-label="alert error"
150               class="s16"
151             ></md-icon>
152           </md-button>
153         </div>
154       </div>
155     </md-dialog-content>
156
157     <md-dialog-actions layout="row" layout-align="space-between center">
158       <div
159         layout="row"
160         layout-align="start center"
161         ng-if="vm.crudPermissions.canEdit"
162       >
163         <md-button
164           type="submit"
165           ng-click="vm.saveInboundRouteApp()"
166           class="send-button md-accent md-raised"
167           ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine"
168           aria-label="SAVE"
169           translate="VOICE.SAVE"
170           translate-attr-aria-label="VOICE.SAVE"
171         >
172           SAVE
173         </md-button>
174       </div>
175     </md-dialog-actions>
176   </form>
177 </md-dialog>