1 <md-dialog class="salesforceAccount-dialog" aria-label="New SalesforceAccount">
2 <form name="salesforceAccountForm" 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.salesforceAccount.name"
51 ng-messages="salesforceAccountForm['name'].$error"
52 ng-show="salesforceAccountForm['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.salesforceAccount.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="salesforceAccountForm['type'].$error"
75 ng-show="salesforceAccountForm['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.salesforceAccount.username"
95 ng-messages="salesforceAccountForm['username'].$error"
96 ng-show="salesforceAccountForm['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.salesforceAccount.remoteUri"
116 ng-messages="salesforceAccountForm['remoteUri'].$error"
117 ng-show="salesforceAccountForm['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.PASSWORD">Password</label>
137 ng-model="vm.salesforceAccount.password"
138 placeholder="Password"
140 translate-attr-placeholder="INTEGRATIONS.PASSWORD"
144 ng-messages="salesforceAccountForm['password'].$error"
147 <div ng-message="required">
148 <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
149 >Password field is required</span
152 <div ng-message="pattern">
153 <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
154 >Must contain at least 8 characters, with a minimum of 1 lowercase
155 letter, 1 uppercase letter, 1 numeric character and 1 special
156 character ~!?*@#$%^&-_=+[{]}.</span
160 </md-input-container>
162 <md-input-container class="md-block">
163 <label translate="INTEGRATIONS.CLIENTID">ClientId</label>
167 ng-model="vm.salesforceAccount.clientId"
172 ng-messages="salesforceAccountForm['clientId'].$error"
173 ng-show="salesforceAccountForm['clientId'].$touched"
176 <div ng-message="required">
177 <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED"
178 >ClientId field is required</span
182 </md-input-container>
183 <md-input-container class="md-block">
184 <label translate="INTEGRATIONS.CLIENTSECRET">ClientSecret</label>
188 ng-model="vm.salesforceAccount.clientSecret"
193 ng-messages="salesforceAccountForm['clientSecret'].$error"
194 ng-show="salesforceAccountForm['clientSecret'].$touched"
197 <div ng-message="required">
198 <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED"
199 >ClientSecret field is required</span
203 </md-input-container>
204 <md-input-container class="md-block">
205 <label translate="INTEGRATIONS.SECURITYTOKEN">SecurityToken</label>
209 ng-model="vm.salesforceAccount.securityToken"
214 ng-messages="salesforceAccountForm['securityToken'].$error"
215 ng-show="salesforceAccountForm['securityToken'].$touched"
218 <div ng-message="required">
219 <span translate="INTEGRATIONS.ERRORS.SECURITYTOKEN_REQUIRED"
220 >SecurityToken field is required</span
224 </md-input-container>
225 <md-input-container class="md-block">
226 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
227 >MotionProxyAddress</label
232 ng-model="vm.salesforceAccount.serverUrl"
236 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
239 ng-messages="salesforceAccountForm['serverUrl'].$error"
240 ng-show="salesforceAccountForm['serverUrl'].$touched"
243 <div ng-message="required">
244 <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
245 >MotionProxyAddress field is required</span
248 <div ng-message="url">
250 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
251 >MotionProxyAddress must be a valid url
252 http://www.xcally.com</span
256 </md-input-container>
257 <md-input-container class="md-block">
258 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
262 ng-model="vm.salesforceAccount.description"
266 ng-messages="salesforceAccountForm['description'].$error"
267 ng-show="salesforceAccountForm['description'].$touched"
270 <div ng-message="required">
271 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
272 >Description field is required</span
276 </md-input-container>
278 <div class="error-list">
280 ng-repeat="error in vm.errors"
283 layout-align="space-between center"
286 <span class="message">{{error.message}}</span>
287 <span class="type">({{error.type}})</span>
289 <md-button class="md-icon-button">
291 md-font-icon="icon-alert-box"
292 aria-label="alert error"
302 layout-align="space-between center"
303 ng-if="!vm.crudPermissions.readOnly"
305 <div layout="row" layout-align="start center">
308 ng-if="vm.crudPermissions.canEdit && !vm.newSalesforceAccount"
309 ng-click="vm.saveSalesforceAccount()"
310 class="send-button md-accent md-raised"
311 ng-disabled="salesforceAccountForm.$invalid || salesforceAccountForm.$pristine"
313 translate="INTEGRATIONS.SAVE"
314 translate-attr-aria-label="INTEGRATIONS.SAVE"
321 ng-if="vm.crudPermissions.canEdit && vm.newSalesforceAccount"
322 ng-click="vm.addNewSalesforceAccount()"
323 class="send-button md-accent md-raised"
324 ng-disabled="salesforceAccountForm.$invalid"
326 translate="INTEGRATIONS.ADD_SALESFORCEACCOUNT"
327 translate-attr-aria-label="INTEGRATIONS.ADD_SALESFORCEACCOUNT"
329 ADD SALESFORCEACCOUNT
334 class="md-icon-button"
335 ng-if="vm.crudPermissions.canDelete && !vm.newSalesforceAccount"
336 ng-click="vm.deleteSalesforceAccount($event)"
339 translate-attr-aria-label="INTEGRATIONS.DELETE"
341 <md-icon md-font-icon="icon-delete"></md-icon>
343 ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip