1 <md-dialog class="project-dialog" aria-label="New dialog" ng-init="vm.onInit()">
2 <form name="dialogForm" 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"
10 ><span translate="CALLYSQUARE.EDIT"></span>
11 <span translate="CALLYSQUARE.{{vm.cellName | uppercase}}"></span
13 <md-button class="md-icon-button" ng-click="vm.closeDialog()">
15 md-font-icon="icon-close"
16 aria-label="Close dialog"
21 <md-dialog-content ms-scroll>
24 ng-repeat="attribute in vm.attributes"
25 ng-switch="attribute.name"
27 <label translate="CALLYSQUARE.{{attribute.name | uppercase}}"
28 >{{attribute.name | ucfirst }}</label
31 <!-- START SELECT INPUT -->
33 name="{{attribute.name}}"
34 ng-model="attribute.value"
35 ng-disabled="!vm.crudPermissions.canEdit"
36 ng-switch-when-separator="|"
37 ng-switch-when="answer|trunk_name|trunk_id|queue_id|file_id|variable_id|google_cloud_tts_text_type|google_tts_language|ispeech_tts_language|ispeech_asr_language|google_asr_language|hiddendigitspos|odbc_id|project_id|beep|account_id|interval_id|template_id|list_id|recordingFormat|callback_priority|aws_polly_voice|aws_polly_region|aws_lex_region|sms_account_id|findBy|pause_id|aws_text_type|dialogflow_language|ndagenerate_audio|ndaactivity_type|languageCode|ssmlGender|method"
38 ng-required="attribute.required"
40 <md-option ng-if="attribute.defaultValue" ng-value="''">
45 ng-repeat="v in vm.values[attribute.name]"
46 ng-disabled="v.canSelect === false"
47 >{{v.option}}</md-option
49 <md-option ng-if="!vm.values[attribute.name].length" value="-1"
50 >No {{attribute.name}} available!</md-option
53 <!-- END SELECT INPUT -->
55 <!-- START SELECT INPUT -->
57 name="{{attribute.name}}"
58 ng-model="attribute.value"
59 ng-disabled="!vm.crudPermissions.canEdit"
60 ng-switch-when-separator="|"
61 ng-switch-when="sip_id"
62 ng-required="attribute.required"
64 <md-optgroup label="{{'CALLYSQUARE.AGENTS' | translate}}">
67 ng-repeat="v in vm.values[attribute.name]"
68 ng-if="v.group === 'agent'"
69 ng-disabled="v.canSelect === false"
70 >{{v.option}}</md-option
73 <md-optgroup label="{{'CALLYSQUARE.TELEPHONES' | translate}}">
76 ng-repeat="v in vm.values[attribute.name]"
77 ng-if="v.group === 'telephone'"
78 ng-disabled="v.canSelect === false"
79 >{{v.option}}</md-option
82 <md-optgroup label="{{'CALLYSQUARE.USERS' | translate}}">
85 ng-repeat="v in vm.values[attribute.name]"
86 ng-if="v.group === 'admin' || v.group === 'user'"
87 >{{v.option}}</md-option
90 <md-option ng-if="!vm.values[attribute.name].length" value="-1"
91 >No {{attribute.name}} available!</md-option
94 <!-- END SELECT INPUT -->
96 <!-- START NUMBER INPUT -->
97 <div ng-switch-when="timeout">
98 <div ng-switch="vm.cellName">
100 ng-switch-when-separator="|"
101 ng-switch-when="answer|ext_dial|dial|queue"
104 name="{{attribute.name}}"
106 ng-model="attribute.value"
107 ng-required="attribute.required"
108 ng-disabled="!vm.crudPermissions.canEdit"
112 ng-switch-when-separator="|"
113 ng-switch-when="record|ispeechasr|googleasr"
116 name="{{attribute.name}}"
118 ng-model="attribute.value"
119 ng-required="attribute.required"
120 ng-disabled="!vm.crudPermissions.canEdit"
124 ng-switch-when-separator="|"
125 ng-switch-when="restapi"
128 name="{{attribute.name}}"
130 ng-model="attribute.value"
131 ng-required="attribute.required"
132 ng-disabled="!vm.crudPermissions.canEdit"
139 name="{{attribute.name}}"
141 ng-model="attribute.value"
142 ng-required="attribute.required"
143 ng-disabled="!vm.crudPermissions.canEdit"
149 ng-switch-when-separator="|"
150 ng-switch-when="speed"
153 name="{{attribute.name}}"
156 ng-model="attribute.value"
157 ng-required="attribute.required"
158 ng-disabled="!vm.crudPermissions.canEdit"
162 ng-switch-when-separator="|"
163 ng-switch-when="maxdigit|mindigit|digit"
166 name="{{attribute.name}}"
168 ng-model="attribute.value"
169 ng-required="attribute.required"
170 ng-disabled="!vm.crudPermissions.canEdit"
174 ng-switch-when-separator="|"
175 ng-switch-when="retry|response|hiddendigitsnum|priority"
178 name="{{attribute.name}}"
180 ng-model="attribute.value"
181 ng-required="attribute.required"
182 ng-disabled="!vm.crudPermissions.canEdit"
185 <!-- END NUMBER INPUT -->
187 <!-- START TEXTAREA INPUT -->
189 name="{{attribute.name}}"
190 ng-model="attribute.value"
191 ng-switch-when-separator="|"
192 ng-switch-when="query|sms_text|condition|text|custom_action_data|headers|body|rawHeaders|rawBody"
193 ng-required="attribute.required"
194 ng-disabled="!vm.crudPermissions.canEdit"
196 <!-- END TEXTAREA INPUT -->
198 <!-- START URL INPUT -->
200 ng-switch-when-separator="|"
201 ng-switch-when="ndauth_url|ndassistant_url|url"
203 name="{{attribute.name}}"
204 ng-model="attribute.value"
205 ng-required="attribute.required"
207 <!-- END URL INPUT -->
209 <!-- START TEXT INPUT -->
212 name="{{attribute.name}}"
213 ng-model="attribute.value"
214 ng-required="attribute.required"
215 ng-disabled="!vm.crudPermissions.canEdit"
219 ng-if="attribute.name === 'text' && vm.cellName === 'tts' "
221 <span translate="CALLYSQUARE.HELP.MAX_TEXT_TTS" class="ng-scope"
222 >Max 250 chars are supported</span
225 <!-- END TEXT INPUT-->
227 <div class="hint" ng-if="attribute.help">
229 translate="CALLYSQUARE.HELP.{{attribute.name | uppercase}}"
233 ng-messages="dialogForm[attribute.name].$error"
234 ng-show="dialogForm[attribute.name].$touched"
237 <div ng-message="required">
238 <span translate="CALLYSQUARE.ERRORS.FIELD_REQUIRED"
239 >The field is required</span
243 </md-input-container>
248 layout-align="space-between center"
249 ng-if="vm.crudPermissions.canEdit"
251 <div layout="row" layout-align="start center">
254 ng-click="vm.closeDialog(true)"
255 class="send-button md-accent md-raised"
256 ng-disabled="dialogForm.$invalid || dialogForm.$pristine"
258 translate="CALLYSQUARE.SAVE"
259 translate-attr-aria-label="CALLYSQUARE.SAVE"