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>
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">
16 <span class="message">{{error.message}}</span>
17 <span class="type">({{error.type}})</span>
19 <md-button class="md-icon-button">
20 <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>
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>
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>
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>
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>
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>
63 <div class="error-list">
64 <div ng-repeat="error in vm.errors" class="error" layout="row" layout-align="space-between center">
66 <span class="message">{{error.message}}</span>
67 <span class="type">({{error.type}})</span>
69 <md-button class="md-icon-button">
70 <md-icon md-font-icon="icon-alert-box" aria-label="alert error" class="s16"></md-icon>
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">
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">
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>