0658a87f42640f915867dd109db6ca1a1116ea92
[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.AUDIO_FILES">Audio_Files</label>
42         <md-select
43           name="appdata"
44           ng-model="vm.playback.appdata"
45           autofocus
46           required
47           ng-disabled="!vm.crudPermissions.canEdit"
48         >
49           <md-option
50             ng-value="'/var/opt/motion2/server/files/sounds/converted/{{appdata.save_name}}'"
51             ng-repeat="appdata in vm.sounds"
52             ng-disabled="appdata.canSelect === false"
53             >{{ appdata.name }}</md-option
54           >
55         </md-select>
56         <div
57           ng-messages="inboundrouteFormApp['appdata'].$error"
58           ng-show="inboundrouteFormApp['appdata'].$touched"
59           role="alert"
60         >
61           <div ng-message="required">
62             <span translate="VOICE.ERRORS.AUDIO_FILES_REQUIRED"
63               >Audio_Files 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.playback.options"
74           ng-disabled="!vm.crudPermissions.canEdit"
75         />
76
77         <div
78           ng-messages="inboundrouteFormApp['options'].$error"
79           ng-show="inboundrouteFormApp['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       <md-input-container class="md-block">
90         <md-switch
91           ng-model="vm.playback.answer"
92           aria-label="Answer"
93           ng-disabled="!vm.crudPermissions.canEdit"
94           ><span translate="VOICE.ANSWER">Answer</span></md-switch
95         >
96       </md-input-container>
97
98       <div class="error-list">
99         <div
100           ng-repeat="error in vm.errors"
101           class="error"
102           layout="row"
103           layout-align="space-between center"
104         >
105           <div>
106             <span class="message">{{error.message}}</span>
107             <span class="type">({{error.type}})</span>
108           </div>
109           <md-button class="md-icon-button">
110             <md-icon
111               md-font-icon="icon-alert-box"
112               aria-label="alert error"
113               class="s16"
114             ></md-icon>
115           </md-button>
116         </div>
117       </div>
118     </md-dialog-content>
119
120     <md-dialog-actions layout="row" layout-align="space-between center">
121       <div
122         layout="row"
123         layout-align="start center"
124         ng-if="vm.crudPermissions.canEdit"
125       >
126         <md-button
127           type="submit"
128           ng-click="vm.saveInboundRouteApp()"
129           class="send-button md-accent md-raised"
130           ng-disabled="inboundrouteFormApp.$invalid || inboundrouteFormApp.$pristine"
131           aria-label="SAVE"
132           translate="VOICE.SAVE"
133           translate-attr-aria-label="VOICE.SAVE"
134         >
135           SAVE
136         </md-button>
137       </div>
138     </md-dialog-actions>
139   </form>
140 </md-dialog>