927dd9c51def1ca79ebc73177dfcdbc03c20d12a
[motion-next.git] /
1 <md-dialog class="internalroute-dialog" aria-label="New InternalRoute">
2   <form name="internalrouteFormApp" 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.MAILBOX@CONTEXT">Mailbox@Context</label>
42         <md-select
43           name="voiceMail"
44           ng-model="vm.voicemail.voiceMail"
45           autofocus
46           required
47           ng-disabled="!vm.crudPermissions.canEdit"
48         >
49           <md-option
50             ng-value="'{{voiceMail.mailbox}}@from-voicemail'"
51             ng-repeat="voiceMail in vm.voiceMails"
52             ng-disabled="voiceMail.canSelect === false"
53             >{{ voiceMail.mailbox }}</md-option
54           >
55         </md-select>
56         <div
57           ng-messages="internalrouteFormApp['voiceMail'].$error"
58           ng-show="internalrouteFormApp['voiceMail'].$touched"
59           role="alert"
60         >
61           <div ng-message="required">
62             <span translate="VOICE.ERRORS.MAILBOX@CONTEXT_REQUIRED"
63               >Mailbox@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.OPTIONS">Options</label>
70         <input
71           type="text"
72           name="options"
73           ng-model="vm.voicemail.options"
74           ng-disabled="!vm.crudPermissions.canEdit"
75         />
76
77         <div
78           ng-messages="internalrouteFormApp['options'].$error"
79           ng-show="internalrouteFormApp['options'].$touched"
80           role="alert"
81         >
82           <div ng-message="required">
83             <span translate="VOICE.ERRORS.OPTIONS_REQUIRED"
84               >Options field is required</span
85             >
86           </div>
87         </div>
88       </md-input-container>
89
90       <div class="error-list">
91         <div
92           ng-repeat="error in vm.errors"
93           class="error"
94           layout="row"
95           layout-align="space-between center"
96         >
97           <div>
98             <span class="message">{{error.message}}</span>
99             <span class="type">({{error.type}})</span>
100           </div>
101           <md-button class="md-icon-button">
102             <md-icon
103               md-font-icon="icon-alert-box"
104               aria-label="alert error"
105               class="s16"
106             ></md-icon>
107           </md-button>
108         </div>
109       </div>
110     </md-dialog-content>
111
112     <md-dialog-actions layout="row" layout-align="space-between center">
113       <div
114         layout="row"
115         layout-align="start center"
116         ng-if="vm.crudPermissions.canEdit"
117       >
118         <md-button
119           type="submit"
120           ng-click="vm.saveInternalRouteApp()"
121           class="send-button md-accent md-raised"
122           ng-disabled="internalrouteFormApp.$invalid || internalrouteFormApp.$pristine"
123           aria-label="SAVE"
124           translate="VOICE.SAVE"
125           translate-attr-aria-label="VOICE.SAVE"
126         >
127           SAVE
128         </md-button>
129       </div>
130     </md-dialog-actions>
131   </form>
132 </md-dialog>