e3c9d03ca053c765457a51cc97bad9d6c3d7e52a
[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.CONTEXT">Context</label>
42         <md-select
43           name="context"
44           ng-model="vm.goto.context"
45           autofocus
46           required
47           ng-disabled="!vm.crudPermissions.canEdit"
48         >
49           <md-option
50             ng-value="context.name"
51             ng-repeat="context in vm.contexts"
52             ng-disabled="context.canSelect === false"
53             >{{ context.name }}</md-option
54           >
55         </md-select>
56         <div
57           ng-messages="inboundrouteFormApp['context'].$error"
58           ng-show="inboundrouteFormApp['context'].$touched"
59           role="alert"
60         >
61           <div ng-message="required">
62             <span translate="VOICE.ERRORS.CONTEXT_REQUIRED"
63               >Context field is required</span
64             >
65           </div>
66         </div>
67       </md-input-container>
68       <md-input-container class="md-block">
69         <label translate="VOICE.EXTENSION">Extension</label>
70         <input
71           type="text"
72           name="extension"
73           ng-model="vm.goto.extension"
74           ng-required="true"
75           ng-disabled="!vm.crudPermissions.canEdit"
76         />
77
78         <div
79           ng-messages="inboundrouteFormApp['extension'].$error"
80           ng-show="inboundrouteFormApp['extension'].$touched"
81           role="alert"
82         >
83           <div ng-message="required">
84             <span translate="VOICE.ERRORS.EXTENSION_REQUIRED"
85               >Extension field is required</span
86             >
87           </div>
88         </div>
89       </md-input-container>
90       <md-input-container class="md-block">
91         <label translate="VOICE.PRIORITY">Priority</label>
92         <input
93           type="text"
94           name="priority"
95           ng-model="vm.goto.priority"
96           ng-required="true"
97           ng-disabled="!vm.crudPermissions.canEdit"
98         />
99
100         <div
101           ng-messages="inboundrouteFormApp['priority'].$error"
102           ng-show="inboundrouteFormApp['priority'].$touched"
103           role="alert"
104         >
105           <div ng-message="required">
106             <span translate="VOICE.ERRORS.PRIORITY_REQUIRED"
107               >Priority field is required</span
108             >
109           </div>
110         </div>
111       </md-input-container>
112
113       <div class="error-list">
114         <div
115           ng-repeat="error in vm.errors"
116           class="error"
117           layout="row"
118           layout-align="space-between center"
119         >
120           <div>
121             <span class="message">{{error.message}}</span>
122             <span class="type">({{error.type}})</span>
123           </div>
124           <md-button class="md-icon-button">
125             <md-icon
126               md-font-icon="icon-alert-box"
127               aria-label="alert error"
128               class="s16"
129             ></md-icon>
130           </md-button>
131         </div>
132       </div>
133     </md-dialog-content>
134
135     <md-dialog-actions layout="row" layout-align="space-between center">
136       <div
137         layout="row"
138         layout-align="start center"
139         ng-if="vm.crudPermissions.canEdit"
140       >
141         <md-button
142           type="submit"
143           ng-click="vm.saveInboundRouteApp()"
144           class="send-button md-accent md-raised"
145           ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine"
146           aria-label="SAVE"
147           translate="VOICE.SAVE"
148           translate-attr-aria-label="VOICE.SAVE"
149         >
150           SAVE
151         </md-button>
152       </div>
153     </md-dialog-actions>
154   </form>
155 </md-dialog>