1 <md-dialog class="ivrCampaign-dialog" aria-label="New IvrCampaign">
2 <form name="ivrCampaignForm" 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="MOTIONDIALER.NAME">Name</label>
45 ng-model="vm.ivrCampaign.name"
46 ng-pattern="/^[A-Za-z0-9\.\_]+$/i"
49 ng-disabled="!vm.newIvrCampaign"
52 <div class="hint"><span translate="MOTIONDIALER.HELP.NAME"></span></div>
54 ng-messages="ivrCampaignForm['name'].$error"
55 ng-show="ivrCampaignForm['name'].$touched"
58 <div ng-message="required">
59 <span translate="MOTIONDIALER.ERRORS.NAME_REQUIRED"
60 >Name field is required</span
63 <div ng-message="pattern">
65 translate="MOTIONDIALER.ERRORS.NAME_MUST_VALID_PATTERN"
66 translate-values="{ regex: '/^[A-Za-z0-9\.\_]+$/i' }"
67 >Name must be valid pattern
72 <md-input-container class="md-block">
73 <md-switch ng-model="vm.ivrCampaign.active" aria-label="Active"
74 ><span translate="MOTIONDIALER.ACTIVE">Active</span></md-switch
77 <md-input-container class="md-block">
78 <label translate="MOTIONDIALER.TRUNK">Trunk</label>
79 <md-select name="TrunkId" ng-model="vm.ivrCampaign.TrunkId" required>
82 ng-repeat="TrunkId in vm.trunks"
83 ng-disabled="TrunkId.canSelect === false"
84 >{{ TrunkId.name }}</md-option
88 ng-messages="ivrCampaignForm['TrunkId'].$error"
89 ng-show="ivrCampaignForm['TrunkId'].$touched"
92 <div ng-message="required">
93 <span translate="MOTIONDIALER.ERRORS.TRUNK_REQUIRED"
94 >Trunk field is required</span
99 <md-input-container class="md-block">
100 <label translate="MOTIONDIALER.INTERVAL">Interval</label>
103 ng-model="vm.ivrCampaign.IntervalId"
107 ng-value="IntervalId.id"
108 ng-repeat="IntervalId in vm.interval"
109 ng-disabled="IntervalId.canSelect === false"
110 >{{ IntervalId.name }}</md-option
114 ng-messages="ivrCampaignForm['IntervalId'].$error"
115 ng-show="ivrCampaignForm['IntervalId'].$touched"
118 <div ng-message="required">
119 <span translate="MOTIONDIALER.ERRORS.INTERVAL_REQUIRED"
120 >Interval field is required</span
124 </md-input-container>
125 <md-input-container class="md-block">
126 <label translate="MOTIONDIALER.CHECKDUPLICATE">CheckDuplicate</label>
128 name="dialCheckDuplicateType"
129 ng-model="vm.ivrCampaign.dialCheckDuplicateType"
132 <md-option ng-value="'always'">
133 {{ 'MOTIONDIALER.ALWAYS' | translate }}
136 <md-option ng-value="'never'">
137 {{ 'MOTIONDIALER.NEVER' | translate }}
140 <md-option ng-value="'onlyIfOpen'">
141 {{ 'MOTIONDIALER.ONLY_IF_OPEN' | translate }}
145 ng-messages="ivrCampaignForm['dialCheckDuplicateType'].$error"
146 ng-show="ivrCampaignForm['dialCheckDuplicateType'].$touched"
149 <div ng-message="required">
150 <span translate="MOTIONDIALER.ERRORS.CHECKDUPLICATE_REQUIRED"
151 >CheckDuplicate field is required</span
155 </md-input-container>
156 <md-input-container class="md-block">
157 <label translate="MOTIONDIALER.CALLYSQUAREPROJECT"
158 >CallySquareProject</label
161 name="SquareProjectId"
162 ng-model="vm.ivrCampaign.SquareProjectId"
166 ng-value="SquareProjectId.id"
167 ng-repeat="SquareProjectId in vm.projects"
168 ng-disabled="SquareProjectId.canSelect === false"
169 >{{ SquareProjectId.name }}</md-option
173 ng-messages="ivrCampaignForm['SquareProjectId'].$error"
174 ng-show="ivrCampaignForm['SquareProjectId'].$touched"
177 <div ng-message="required">
178 <span translate="MOTIONDIALER.ERRORS.CALLYSQUAREPROJECT_REQUIRED"
179 >CallySquareProject field is required</span
183 </md-input-container>
184 <md-input-container class="md-block">
185 <label translate="MOTIONDIALER.CONCURRENTCALLS">ConcurrentCalls</label>
189 ng-model="vm.ivrCampaign.limitCalls"
196 <span translate="MOTIONDIALER.HELP.CONCURRENTCALLS"></span>
199 ng-messages="ivrCampaignForm['limitCalls'].$error"
200 ng-show="ivrCampaignForm['limitCalls'].$touched"
203 <div ng-message="required">
204 <span translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_REQUIRED"
205 >ConcurrentCalls field is required</span
208 <div ng-message="min">
210 translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
211 >ConcurrentCalls must be a valid greater or equal than</span
215 <div ng-message="max">
217 translate="MOTIONDIALER.ERRORS.CONCURRENTCALLS_MUST_BE_LESS_THAN_OR_EQUAL_TO"
218 >ConcurrentCalls must be a valid greater or equal than</span
223 </md-input-container>
224 <md-input-container class="md-block">
225 <label translate="MOTIONDIALER.DESCRIPTION">Description</label>
229 ng-model="vm.ivrCampaign.description"
233 ng-messages="ivrCampaignForm['description'].$error"
234 ng-show="ivrCampaignForm['description'].$touched"
237 <div ng-message="required">
238 <span translate="MOTIONDIALER.ERRORS.DESCRIPTION_REQUIRED"
239 >Description field is required</span
243 </md-input-container>
245 <div class="error-list">
247 ng-repeat="error in vm.errors"
250 layout-align="space-between center"
253 <span class="message">{{error.message}}</span>
254 <span class="type">({{error.type}})</span>
256 <md-button class="md-icon-button">
258 md-font-icon="icon-alert-box"
259 aria-label="alert error"
269 layout-align="space-between center"
270 ng-if="!vm.crudPermissions.readOnly"
272 <div layout="row" layout-align="start center">
275 ng-if="vm.crudPermissions.canEdit && !vm.newIvrCampaign"
276 ng-click="vm.saveIvrCampaign()"
277 class="send-button md-accent md-raised"
278 ng-disabled="ivrCampaignForm.$invalid || ivrCampaignForm.$pristine"
280 translate="MOTIONDIALER.SAVE"
281 translate-attr-aria-label="MOTIONDIALER.SAVE"
288 ng-if="vm.crudPermissions.canEdit && vm.newIvrCampaign"
289 ng-click="vm.addNewIvrCampaign()"
290 class="send-button md-accent md-raised"
291 ng-disabled="ivrCampaignForm.$invalid"
293 translate="MOTIONDIALER.ADD_IVRCAMPAIGN"
294 translate-attr-aria-label="MOTIONDIALER.ADD_IVRCAMPAIGN"
301 class="md-icon-button"
302 ng-if="vm.crudPermissions.canDelete && !vm.newIvrCampaign"
303 ng-click="vm.deleteIvrCampaign($event)"
306 translate-attr-aria-label="MOTIONDIALER.DELETE"
308 <md-icon md-font-icon="icon-delete"></md-icon>
310 ><span translate="MOTIONDIALER.DELETE">DELETE</span></md-tooltip