1 <md-dialog class="voicePrefix-dialog" aria-label="New voicePrefix">
2 <form name="voicePrefixForm" 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.NAME">Name</label>
45 ng-model="vm.voicePrefix.name"
46 ng-pattern="/^[A-Za-z0-9\.\_]+$/i"
51 <div class="hint"><span translate="VOICE.HELP.NAME"></span></div>
53 ng-messages="voicePrefixForm['name'].$error"
54 ng-show="voicePrefixForm['name'].$touched"
57 <div ng-message="required">
58 <span translate="VOICE.ERRORS.NAME_REQUIRED"
59 >Name field is required</span
62 <div ng-message="pattern">
64 translate="VOICE.ERRORS.NAME_MUST_VALID_PATTERN"
65 translate-values="{ regex: '/^[A-Za-z0-9\.\_]+$/i' }"
66 >Name must be valid pattern
71 <md-input-container class="md-block">
72 <label translate="VOICE.OUTBOUNDROUTE">OutboundRoute</label>
74 name="VoiceExtensionId"
75 ng-model="vm.voicePrefix.VoiceExtensionId"
79 ng-value="VoiceExtensionId.id"
80 ng-repeat="VoiceExtensionId in vm.outboundRoutes"
81 ng-disabled="VoiceExtensionId.canSelect === false"
82 >{{ VoiceExtensionId.exten }}</md-option
86 ng-messages="voicePrefixForm['VoiceExtensionId'].$error"
87 ng-show="voicePrefixForm['VoiceExtensionId'].$touched"
90 <div ng-message="required">
91 <span translate="VOICE.ERRORS.OUTBOUNDROUTE_REQUIRED"
92 >OutboundRoute field is required</span
97 <md-input-container class="md-block">
98 <label translate="VOICE.CALLERIDALL">CallerIdAll</label>
102 ng-model="vm.voicePrefix.callerIdAll"
103 ng-pattern='/"(.*)"\s<(.*?)>$/'
106 <div class="hint"><span translate="VOICE.HELP.CALLERIDALL"></span></div>
108 ng-messages="voicePrefixForm['callerIdAll'].$error"
109 ng-show="voicePrefixForm['callerIdAll'].$touched"
112 <div ng-message="required">
113 <span translate="VOICE.ERRORS.CALLERIDALL_REQUIRED"
114 >CallerIdAll field is required</span
117 <div ng-message="pattern">
119 translate="VOICE.ERRORS.CALLERIDALL_MUST_VALID_PATTERN"
120 translate-values="{ regex: '/"(.*)"\s<(.*?)>$/' }"
121 >CallerIdAll must be valid pattern
125 </md-input-container>
126 <md-input-container class="md-block">
127 <label translate="VOICE.DESCRIPTION">Description</label>
131 ng-model="vm.voicePrefix.description"
135 ng-messages="voicePrefixForm['description'].$error"
136 ng-show="voicePrefixForm['description'].$touched"
139 <div ng-message="required">
140 <span translate="VOICE.ERRORS.DESCRIPTION_REQUIRED"
141 >Description field is required</span
145 </md-input-container>
147 <div class="error-list">
149 ng-repeat="error in vm.errors"
152 layout-align="space-between center"
155 <span class="message">{{error.message}}</span>
156 <span class="type">({{error.type}})</span>
158 <md-button class="md-icon-button">
160 md-font-icon="icon-alert-box"
161 aria-label="alert error"
171 layout-align="space-between center"
172 ng-if="!vm.crudPermissions.readOnly"
174 <div layout="row" layout-align="start center">
177 ng-if="vm.crudPermissions.canEdit && !vm.newvoicePrefix"
178 ng-click="vm.savevoicePrefix()"
179 class="send-button md-accent md-raised"
180 ng-disabled="voicePrefixForm.$invalid || voicePrefixForm.$pristine"
182 translate="VOICE.SAVE"
183 translate-attr-aria-label="VOICE.SAVE"
190 ng-if="vm.crudPermissions.canEdit && vm.newvoicePrefix"
191 ng-click="vm.addNewvoicePrefix()"
192 class="send-button md-accent md-raised"
193 ng-disabled="voicePrefixForm.$invalid"
195 translate="VOICE.ADD_VOICEPREFIX"
196 translate-attr-aria-label="VOICE.ADD_VOICEPREFIX"
203 class="md-icon-button"
204 ng-if="vm.crudPermissions.canDelete && !vm.newvoicePrefix"
205 ng-click="vm.deletevoicePrefix($event)"
208 translate-attr-aria-label="VOICE.DELETE"
210 <md-icon md-font-icon="icon-delete"></md-icon>
211 <md-tooltip><span translate="VOICE.DELETE">DELETE</span></md-tooltip>