1 <md-dialog class="zendeskAccount-dialog" aria-label="New ZendeskAccount">
2 <form name="zendeskAccountForm" 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="INTEGRATIONS.NAME">Name</label>
45 ng-model="vm.zendeskAccount.name"
51 ng-messages="zendeskAccountForm['name'].$error"
52 ng-show="zendeskAccountForm['name'].$touched"
55 <div ng-message="required">
56 <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
57 >Name field is required</span
62 <md-input-container class="md-block">
63 <label translate="INTEGRATIONS.TYPE">Type</label>
64 <md-select name="type" ng-model="vm.zendeskAccount.type" required>
65 <md-option ng-value="'integrationTab'">
66 {{ 'INTEGRATIONS.INTEGRATION_TAB' | translate }}
69 <md-option ng-value="'newTab'">
70 {{ 'INTEGRATIONS.NEW_TAB' | translate }}
74 ng-messages="zendeskAccountForm['type'].$error"
75 ng-show="zendeskAccountForm['type'].$touched"
78 <div ng-message="required">
79 <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED"
80 >Type field is required</span
85 <md-input-container class="md-block">
86 <label translate="INTEGRATIONS.USERNAME">Username</label>
90 ng-model="vm.zendeskAccount.username"
95 ng-messages="zendeskAccountForm['username'].$error"
96 ng-show="zendeskAccountForm['username'].$touched"
99 <div ng-message="required">
100 <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
101 >Username field is required</span
105 </md-input-container>
106 <md-input-container class="md-block">
107 <label translate="INTEGRATIONS.URI">Uri</label>
111 ng-model="vm.zendeskAccount.remoteUri"
116 ng-messages="zendeskAccountForm['remoteUri'].$error"
117 ng-show="zendeskAccountForm['remoteUri'].$touched"
120 <div ng-message="required">
121 <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED"
122 >Uri field is required</span
125 <div ng-message="url">
126 <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL"
127 >Uri must be a valid url http://www.xcally.com</span
131 </md-input-container>
132 <md-input-container class="md-block">
133 <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>
136 ng-model="vm.zendeskAccount.authType"
139 <md-option ng-value="'password'">Password</md-option>
140 <md-option ng-value="'token'">Token</md-option>
143 ng-messages="zendeskAccountForm['authType'].$error"
144 ng-show="zendeskAccountForm['authType'].$touched"
147 <div ng-message="required">
148 <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED"
149 >AuthType field is required</span
153 </md-input-container>
156 ng-if="vm.zendeskAccount.authType == 'password'"
158 <label translate="INTEGRATIONS.PASSWORD">Password</label>
162 ng-model="vm.zendeskAccount.password"
163 placeholder="Password"
165 translate-attr-placeholder="INTEGRATIONS.PASSWORD"
168 <div ng-messages="zendeskAccountForm['password'].$error" role="alert">
169 <div ng-message="required">
170 <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
171 >Password field is required</span
174 <div ng-message="pattern">
175 <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
176 >Must contain at least 8 characters, with a minimum of 1 lowercase
177 letter, 1 uppercase letter, 1 numeric character and 1 special
178 character ~!?*@#$%^&-_=+[{]}.</span
182 </md-input-container>
185 ng-if="vm.zendeskAccount.authType == 'token'"
188 <label translate="INTEGRATIONS.TOKEN">Token</label>
192 ng-model="vm.zendeskAccount.token"
197 ng-messages="zendeskAccountForm['token'].$error"
198 ng-show="zendeskAccountForm['token'].$touched"
201 <div ng-message="required">
202 <span translate="INTEGRATIONS.ERRORS.TOKEN_REQUIRED"
203 >Token field is required</span
207 </md-input-container>
208 <md-input-container class="md-block">
209 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
210 >MotionProxyAddress</label
215 ng-model="vm.zendeskAccount.serverUrl"
219 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
222 ng-messages="zendeskAccountForm['serverUrl'].$error"
223 ng-show="zendeskAccountForm['serverUrl'].$touched"
226 <div ng-message="required">
227 <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
228 >MotionProxyAddress field is required</span
231 <div ng-message="url">
233 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
234 >MotionProxyAddress must be a valid url
235 http://www.xcally.com</span
239 </md-input-container>
240 <md-input-container class="md-block">
241 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
245 ng-model="vm.zendeskAccount.description"
249 ng-messages="zendeskAccountForm['description'].$error"
250 ng-show="zendeskAccountForm['description'].$touched"
253 <div ng-message="required">
254 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
255 >Description field is required</span
259 </md-input-container>
261 <div class="error-list">
263 ng-repeat="error in vm.errors"
266 layout-align="space-between center"
269 <span class="message">{{error.message}}</span>
270 <span class="type">({{error.type}})</span>
272 <md-button class="md-icon-button">
274 md-font-icon="icon-alert-box"
275 aria-label="alert error"
285 layout-align="space-between center"
286 ng-if="!vm.crudPermissions.readOnly"
288 <div layout="row" layout-align="start center">
291 ng-if="vm.crudPermissions.canEdit && !vm.newZendeskAccount"
292 ng-click="vm.saveZendeskAccount()"
293 class="send-button md-accent md-raised"
294 ng-disabled="zendeskAccountForm.$invalid || zendeskAccountForm.$pristine"
296 translate="INTEGRATIONS.SAVE"
297 translate-attr-aria-label="INTEGRATIONS.SAVE"
304 ng-if="vm.crudPermissions.canEdit && vm.newZendeskAccount"
305 ng-click="vm.addNewZendeskAccount()"
306 class="send-button md-accent md-raised"
307 ng-disabled="zendeskAccountForm.$invalid"
309 translate="INTEGRATIONS.ADD_ZENDESKACCOUNT"
310 translate-attr-aria-label="INTEGRATIONS.ADD_ZENDESKACCOUNT"
317 class="md-icon-button"
318 ng-if="vm.crudPermissions.canDelete && !vm.newZendeskAccount"
319 ng-click="vm.deleteZendeskAccount($event)"
322 translate-attr-aria-label="INTEGRATIONS.DELETE"
324 <md-icon md-font-icon="icon-delete"></md-icon>
326 ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip