1 <md-dialog class="outboundroute-dialog" aria-label="New OutboundRoute">
2 <form name="outboundrouteForm" class="md-inline-form" novalidate>
3 <md-toolbar class="md-accent md-hue-2">
5 class="md-toolbar-tools"
7 layout-align="space-between center"
9 <span class="title">{{ vm.title | translate }}</span>
10 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
12 md-font-icon="icon-close"
13 aria-label="Close dialog"
19 <md-dialog-content ms-scroll>
20 <div class="error-list">
22 ng-repeat="error in vm.errors"
25 layout-align="space-between center"
28 <span class="message">{{error.message}}</span>
29 <span class="type">({{error.type}})</span>
31 <md-button class="md-icon-button">
33 md-font-icon="icon-alert-box"
34 aria-label="alert error"
40 <md-input-container class="md-block">
41 <label translate="VOICE.PHONENUMBER">PhoneNumber</label>
45 ng-model="vm.outboundroute.exten"
51 ng-messages="outboundrouteForm['exten'].$error"
52 ng-show="outboundrouteForm['exten'].$touched"
55 <div ng-message="required">
56 <span translate="VOICE.ERRORS.PHONENUMBER_REQUIRED"
57 >PhoneNumber field is required</span
62 <md-input-container class="md-block">
63 <label translate="VOICE.CONTEXT">Context</label>
64 <md-select name="context" ng-model="vm.outboundroute.context" required>
66 ng-value="context.name"
67 ng-repeat="context in vm.contexts"
68 ng-disabled="context.canSelect === false"
69 >{{ context.name }}</md-option
73 ng-messages="outboundrouteForm['context'].$error"
74 ng-show="outboundrouteForm['context'].$touched"
77 <div ng-message="required">
78 <span translate="VOICE.ERRORS.CONTEXT_REQUIRED"
79 >Context field is required</span
84 <md-input-container class="md-block">
85 <label translate="VOICE.RECORDING">Recording</label>
87 name="recordingFormat"
88 ng-model="vm.outboundroute.recordingFormat"
91 <md-option ng-value="'none'">none</md-option>
92 <md-option ng-value="'wav'">wav</md-option>
93 <md-option ng-value="'WAV'">wav49</md-option>
94 <md-option ng-value="'gsm'">gsm</md-option>
96 <div class="hint"><span translate="VOICE.HELP.RECORDING"></span></div>
98 ng-messages="outboundrouteForm['recordingFormat'].$error"
99 ng-show="outboundrouteForm['recordingFormat'].$touched"
102 <div ng-message="required">
103 <span translate="VOICE.ERRORS.RECORDING_REQUIRED"
104 >Recording field is required</span
108 </md-input-container>
109 <md-input-container class="md-block">
110 <label translate="VOICE.CUTDIGITS">CutDigits</label>
114 ng-model="vm.outboundroute.cutdigits"
119 ng-messages="outboundrouteForm['cutdigits'].$error"
120 ng-show="outboundrouteForm['cutdigits'].$touched"
123 <div ng-message="required">
124 <span translate="VOICE.ERRORS.CUTDIGITS_REQUIRED"
125 >CutDigits field is required</span
128 <div ng-message="min">
130 translate="VOICE.ERRORS.CUTDIGITS_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
131 >CutDigits must be a valid greater or equal than</span
136 </md-input-container>
137 <md-input-container class="md-block">
138 <label translate="VOICE.DESCRIPTION">Description</label>
142 ng-model="vm.outboundroute.description"
146 ng-messages="outboundrouteForm['description'].$error"
147 ng-show="outboundrouteForm['description'].$touched"
150 <div ng-message="required">
151 <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED"
152 >Description field is required</span
156 </md-input-container>
158 <div class="error-list">
160 ng-repeat="error in vm.errors"
163 layout-align="space-between center"
166 <span class="message">{{error.message}}</span>
167 <span class="type">({{error.type}})</span>
169 <md-button class="md-icon-button">
171 md-font-icon="icon-alert-box"
172 aria-label="alert error"
182 layout-align="space-between center"
183 ng-if="!vm.crudPermissions.readOnly"
185 <div layout="row" layout-align="start center">
188 ng-if="vm.crudPermissions.canEdit && !vm.newOutboundRoute"
189 ng-click="vm.saveOutboundRoute()"
190 class="send-button md-accent md-raised"
191 ng-disabled="outboundrouteForm.$invalid || outboundrouteForm.$pristine"
193 translate="VOICE.SAVE"
194 translate-attr-aria-label="VOICE.SAVE"
201 ng-if="vm.crudPermissions.canEdit && vm.newOutboundRoute"
202 ng-click="vm.addNewOutboundRoute()"
203 class="send-button md-accent md-raised"
204 ng-disabled="outboundrouteForm.$invalid"
206 translate="VOICE.ADD_OUTBOUNDROUTE"
207 translate-attr-aria-label="VOICE.ADD_OUTBOUNDROUTE"
214 class="md-icon-button"
215 ng-if="vm.crudPermissions.canDelete && !vm.newOutboundRoute"
216 ng-click="vm.deleteOutboundRoute($event)"
219 translate-attr-aria-label="VOICE.DELETE"
221 <md-icon md-font-icon="icon-delete"></md-icon>
222 <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>