Built motion from commit b598105.|2.0.10
[motion2.git] / public / app / main / apps / voice / views / voiceQueues / create / dialog.html
1 <md-dialog class="voiceQueue-dialog" aria-label="New VoiceQueue">
2     <form name="voiceQueueForm" class="md-inline-form" novalidate>
3         <md-toolbar class="md-accent md-hue-2">
4             <div class="md-toolbar-tools" layout="row" layout-align="space-between center">
5                 <span class="title">{{ vm.title | translate }}</span>
6                 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
7                     <md-icon md-font-icon="icon-close" aria-label="Close dialog"></md-icon>
8                 </md-button>
9             </div>
10         </md-toolbar>
11
12         <md-dialog-content ms-scroll>
13             <div class="error-list">
14                 <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">
15                     <div>
16                         <span class="message">{{error.message}}</span>
17                         <span class="type">({{error.type}})</span>
18                     </div>
19                     <md-button class="md-icon-button">
20                         <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>
21                     </md-button>
22                 </div>
23             </div>
24             <md-input-container class="md-block">
25                 <label translate="VOICE.NAME">Name</label>
26                 <input type="text" name="name" ng-model="vm.voiceQueue.name" ng-pattern="/^[A-Za-z0-9\.\_]+$/i" required md-autofocus>
27                 <div ng-messages="voiceQueueForm.name.$error" ng-show="voiceQueueForm.name.$touched" role="alert">
28                     <div ng-message="required">
29                         <span translate="VOICE.ERRORS.NAME_REQUIRED">Name field is required</span>
30                     </div>
31                     <div ng-message="pattern">
32                         <span translate="VOICE.ERRORS.NAME_MUST_VALID_PATTERN" translate-values="{ regex: '/^[A-Za-z0-9\.\_]+$/i' }">Name must be valid pattern </span>
33                     </div>
34                 </div>
35             </md-input-container>
36             <md-input-container class="md-block">
37                 <label translate="VOICE.STRATEGY">Strategy</label>
38                 <md-select ng-model="vm.voiceQueue.strategy" required>
39                     <md-option ng-value="'ringall'">Ringall</md-option>
40                     <md-option ng-value="'rrmemory'">Round Robin Memory</md-option>
41                     <md-option ng-value="'leastrecent'">Least Recent</md-option>
42                     <md-option ng-value="'fewestcalls'">Fewest Calls</md-option>
43                     <md-option ng-value="'random'">Random</md-option>
44                     <md-option ng-value="'linear'">Linear</md-option>
45                     <md-option ng-value="'wrandom'">Weight Random</md-option>
46                 </md-select>
47                 <div ng-messages="voiceQueueForm.strategy.$error" ng-show="voiceQueueForm.strategy.$touched" role="alert">
48                     <div ng-message="required">
49                         <span translate="VOICE.ERRORS.STRATEGY_REQUIRED">Strategy field is required</span>
50                     </div>
51                 </div>
52             </md-input-container>
53             <md-input-container class="md-block">
54                 <label translate="VOICE.DESCRIPTION">Description</label>
55                 <input type="text" name="description" ng-model="vm.voiceQueue.description">
56                 <div ng-messages="voiceQueueForm.description.$error" ng-show="voiceQueueForm.description.$touched" role="alert">
57                     <div ng-message="required">
58                         <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED">Description field is required</span>
59                     </div>
60                 </div>
61             </md-input-container>
62
63             <div class="error-list">
64                 <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">
65                     <div>
66                         <span class="message">{{error.message}}</span>
67                         <span class="type">({{error.type}})</span>
68                     </div>
69                     <md-button class="md-icon-button">
70                         <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>
71                     </md-button>
72                 </div>
73             </div>
74         </md-dialog-content>
75
76         <md-dialog-actions layout="row" layout-align="space-between center">
77             <div layout="row" layout-align="start center">
78                 <md-button type="submit" ng-if="!vm.newVoiceQueue" ng-click="vm.saveVoiceQueue()" class="send-button md-accent md-raised" ng-disabled="voiceQueueForm.$invalid || voiceQueueForm.$pristine" aria-label="SAVE" translate="VOICE.SAVE" translate-attr-aria-label="VOICE.SAVE">
79                     SAVE
80                 </md-button>
81
82                 <md-button type="submit" ng-if="vm.newVoiceQueue" ng-click="vm.addNewVoiceQueue()" class="send-button md-accent md-raised" ng-disabled="voiceQueueForm.$invalid" aria-label="ADD" translate="VOICE.ADD_VOICEQUEUE" translate-attr-aria-label="VOICE.ADD_VOICEQUEUE">
83                     ADD VOICEQUEUE
84                 </md-button>
85             </div>
86             <div layout="row">
87                 <md-button class="md-icon-button" ng-if="!vm.newVoiceQueue" ng-click="vm.deleteVoiceQueue($event)" aria-label="DELETE" translate translate-attr-aria-label="VOICE.DELETE">
88                     <md-icon md-font-icon="icon-delete"></md-icon>
89                     <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>
90                 </md-button>
91             </div>
92         </md-dialog-actions>
93     </form>
94 </md-dialog>