2 id="integrations-salesforceAccount"
3 class="page-layout simple tabbed"
7 <div class="header md-accent-bg" layout="row" layout-align="start center">
8 <div class="white-fg" layout="row" layout-align="start center" flex>
10 class="goto-salesforceAccounts-button md-icon-button"
11 aria-label="Go to salesforceAccounts"
12 ng-click="vm.gotoSalesforceAccounts()"
14 translate-attr-aria-label="INTEGRATIONS.GO_TO_SALESFORCEACCOUNTS"
16 <md-icon md-font-icon="icon-arrow-left"></md-icon>
19 <div layout="row" layout-align="start center">
20 <div class="salesforceAccount-image" hide-xs>
21 <img ng-src="assets/images/business/salesforceAccounts.jpg" />
24 <div layout="column" layout-align="start start">
26 #{{vm.salesforceAccount.id}}
27 <span ng-if="vm.salesforceAccount.name"
28 >{{vm.salesforceAccount.name}}</span
31 <div class="subtitle secondary-text">
32 <span translate="INTEGRATIONS.CREATED_AT"></span>
33 <span>{{vm.salesforceAccount.createdAt | date:'medium'}}</span>
41 ng-click="vm.saveSalesforceAccount()"
42 ng-if="vm.crudPermissions.canEdit"
43 class="send-button md-accent md-raised"
44 ng-disabled="(generalForm.$invalid) || (configurationsForm.$invalid)"
45 translate="INTEGRATIONS.SAVE"
46 translate-attr-aria-label="INTEGRATIONS.SAVE"
57 md-selected="vm.selectedTab"
58 md-stretch-tabs="always"
65 <span translate="INTEGRATIONS.ACCOUNT">ACCOUNT</span>
69 class="salesforceAccount-detail-form-container general md-background-bg md-whiteframe-1dp"
71 <div class="pb-16" layout="row" layout-align="start center">
72 <div class="h2 secondary-text" translate="INTEGRATIONS.GENERAL">
76 <form name="generalForm" novalidate>
77 <md-input-container class="md-block">
78 <label translate="INTEGRATIONS.NAME">Name</label>
82 ng-model="vm.salesforceAccount.name"
85 ng-disabled="!vm.crudPermissions.canEdit"
89 ng-messages="generalForm['name'].$error"
90 ng-show="generalForm['name'].$touched"
93 <div ng-message="required">
94 <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
95 >Name field is required</span
100 <md-input-container class="md-block">
101 <label translate="INTEGRATIONS.TYPE">Type</label>
104 ng-model="vm.salesforceAccount.type"
106 ng-disabled="!vm.crudPermissions.canEdit"
108 <md-option ng-value="'integrationTab'">
109 {{ 'INTEGRATIONS.INTEGRATION_TAB' | translate }}
112 <md-option ng-value="'newTab'">
113 {{ 'INTEGRATIONS.NEW_TAB' | translate }}
117 ng-messages="generalForm['type'].$error"
118 ng-show="generalForm['type'].$touched"
121 <div ng-message="required">
122 <span translate="INTEGRATIONS.ERRORS.TYPE_REQUIRED"
123 >Type field is required</span
127 </md-input-container>
128 <md-input-container class="md-block">
129 <label translate="INTEGRATIONS.USERNAME">Username</label>
133 ng-model="vm.salesforceAccount.username"
135 ng-disabled="!vm.crudPermissions.canEdit"
139 ng-messages="generalForm['username'].$error"
140 ng-show="generalForm['username'].$touched"
143 <div ng-message="required">
144 <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
145 >Username field is required</span
149 </md-input-container>
150 <md-input-container class="md-block">
151 <label translate="INTEGRATIONS.URI">Uri</label>
155 ng-model="vm.salesforceAccount.remoteUri"
157 ng-disabled="!vm.crudPermissions.canEdit"
161 ng-messages="generalForm['remoteUri'].$error"
162 ng-show="generalForm['remoteUri'].$touched"
165 <div ng-message="required">
166 <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED"
167 >Uri field is required</span
170 <div ng-message="url">
171 <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL"
172 >Uri must be a valid url http://www.xcally.com</span
176 </md-input-container>
177 <md-input-container class="md-block">
178 <label translate="INTEGRATIONS.PASSWORD">Password</label>
182 ng-model="vm.salesforceAccount.password"
183 placeholder="Password"
185 translate-attr-placeholder="INTEGRATIONS.PASSWORD"
188 <div ng-messages="generalForm['password'].$error" role="alert">
189 <div ng-message="required">
190 <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
191 >Password field is required</span
194 <div ng-message="pattern">
196 translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
197 >Must contain at least 8 characters, with a minimum of 1
198 lowercase letter, 1 uppercase letter, 1 numeric character
199 and 1 special character ~!?*@#$%^&-_=+[{]}.</span
203 </md-input-container>
205 <md-input-container class="md-block">
206 <label translate="INTEGRATIONS.CLIENTID">ClientId</label>
210 ng-model="vm.salesforceAccount.clientId"
212 ng-disabled="!vm.crudPermissions.canEdit"
216 ng-messages="generalForm['clientId'].$error"
217 ng-show="generalForm['clientId'].$touched"
220 <div ng-message="required">
221 <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED"
222 >ClientId field is required</span
226 </md-input-container>
227 <md-input-container class="md-block">
228 <label translate="INTEGRATIONS.CLIENTSECRET"
234 ng-model="vm.salesforceAccount.clientSecret"
236 ng-disabled="!vm.crudPermissions.canEdit"
240 ng-messages="generalForm['clientSecret'].$error"
241 ng-show="generalForm['clientSecret'].$touched"
244 <div ng-message="required">
245 <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED"
246 >ClientSecret field is required</span
250 </md-input-container>
251 <md-input-container class="md-block">
252 <label translate="INTEGRATIONS.SECURITYTOKEN"
253 >SecurityToken</label
258 ng-model="vm.salesforceAccount.securityToken"
260 ng-disabled="!vm.crudPermissions.canEdit"
264 ng-messages="generalForm['securityToken'].$error"
265 ng-show="generalForm['securityToken'].$touched"
268 <div ng-message="required">
269 <span translate="INTEGRATIONS.ERRORS.SECURITYTOKEN_REQUIRED"
270 >SecurityToken field is required</span
274 </md-input-container>
275 <md-input-container class="md-block">
276 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
277 >MotionProxyAddress</label
282 ng-model="vm.salesforceAccount.serverUrl"
283 ng-disabled="!vm.crudPermissions.canEdit"
287 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
290 ng-messages="generalForm['serverUrl'].$error"
291 ng-show="generalForm['serverUrl'].$touched"
294 <div ng-message="required">
296 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
297 >MotionProxyAddress field is required</span
300 <div ng-message="url">
302 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
303 >MotionProxyAddress must be a valid url
304 http://www.xcally.com</span
308 </md-input-container>
309 <md-input-container class="md-block">
310 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
314 ng-model="vm.salesforceAccount.description"
315 ng-disabled="!vm.crudPermissions.canEdit"
319 ng-messages="generalForm['description'].$error"
320 ng-show="generalForm['description'].$touched"
323 <div ng-message="required">
324 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
325 >Description field is required</span
329 </md-input-container>
336 <span translate="INTEGRATIONS.CONFIGURATIONS">CONFIGURATIONS</span>
340 class="salesforceAccount-detail-form-container configurations md-background-bg md-whiteframe-1dp"
342 <div class="pb-16" layout="row" layout-align="start center">
344 class="h2 secondary-text"
345 translate="INTEGRATIONS.CONFIGURATIONS"
351 ng-controller="SalesforceAccountConfigurationsController as vm_cc"
352 ng-init="vm_cc.init(vm.salesforceAccount, vm.crudPermissions)"
355 <md-card class="md-whiteframe-1dp" flex="30">
356 <div layout="row" layout-align="center center">
357 <md-subheader flex="75" class="md-no-sticky"
358 >{{ 'INTEGRATIONS.CONFIGURATIONS' | translate
363 ng-if="vm_cc.crudPermissions.canEdit"
364 ng-click="vm_cc.createOrEditSalesforceConfiguration($event)"
365 class="md-icon-button"
366 aria-label="create salesforceConfiguration"
368 <md-icon md-font-icon="icon-plus"></md-icon>
374 layout-align="center center"
375 ng-repeat="salesforceConfiguration in vm_cc.configurations"
377 md-colors="{background: (vm_cc.selectedSalesforceConfiguration == $index ? 'accent' : 'grey-A100')}"
378 ng-click="vm_cc.getSalesforceConfiguration($index)"
380 <span class="text-truncate" flex="80"
381 >{{ salesforceConfiguration.name }}</span
383 <md-menu ng-if="vm_cc.crudPermissions.canDelete">
385 class="md-icon-button"
388 translate-attr-aria-label="INTEGRATIONS.MORE"
389 ng-click="$mdOpenMenu($event)"
391 <md-icon md-font-icon="icon-dots-vertical"></md-icon>
393 <md-menu-content width="3">
394 <md-menu-item ng-if="vm_cc.crudPermissions.canDelete">
396 ng-click="vm_cc.deleteSalesforceConfiguration($event, salesforceConfiguration)"
397 translate="INTEGRATIONS.DELETE_SALESFORCECONFIGURATION"
399 Delete SalesforceConfiguration
408 <md-card class="md-whiteframe-1dp" flex="65">
409 <md-tabs ng-if="vm_cc.configurations.length" md-dynamic-height>
412 <span translate="INTEGRATIONS.SUBJECTS">SUBJECTS</span>
416 class="md-table-toolbar md-default no-padding"
417 ng-hide="vm_cc.selectedSubjects.length"
419 <div class="md-toolbar-tools">
422 on-search="vm_cc.query.subject = query"
423 on-collapse="vm_cc.query.subject = undefined"
427 ng-if="vm_cc.crudPermissions.canEdit"
428 class="md-icon-button"
429 ng-click="vm_cc.createOrEditSubject($event)"
430 aria-label="add subject"
432 translate-attr-label="INTEGRATIONS.ADD_SUBJECT"
434 <md-icon md-font-icon="icon-plus"></md-icon>
439 class="md-table-toolbar md-accent"
440 ng-show="vm_cc.selectedSubjects.length"
442 <div class="md-toolbar-tools">
443 <span class="md-subhead"
444 >{{vm_cc.selectedSubjects.length}}
445 {{vm_cc.selectedSubjects.length > 1 ? 'items' :
446 'item'}} selected</span
450 ng-if="vm_cc.crudPermissions.canDelete"
451 class="md-icon-button"
452 ng-click="vm_cc.deleteSelectedSubjects($event)"
453 aria-label="delete selected"
455 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
457 <md-icon md-font-icon="icon-delete"></md-icon>
462 class="md-whiteframe-1dp padding-horizontal"
468 ng-model="vm_cc.selectedSubjects"
473 {{ 'INTEGRATIONS.ID' | translate }}
476 {{ 'INTEGRATIONS.TYPE' | translate }}
479 {{ 'INTEGRATIONS.CONTENT' | translate }}
481 <th md-column width="10px"></th>
489 ng-repeat="subject in vm_cc.subjects | filter: vm_cc.query.subject"
492 ng-click="vm_cc.createOrEditSubject($event, subject)"
499 ng-click="vm_cc.createOrEditSubject($event, subject)"
503 <span ng-if="subject.FieldId"
504 >{{subject.nameField ||
505 subject.idField}}</span
507 <span ng-if="!subject.FieldId"
508 >{{subject.type}}</span
512 ng-switch="subject.type"
513 ng-click="vm_cc.createOrEditSubject($event, subject)"
516 <span ng-switch-when="string"
517 >{{subject.content}}</span
520 ng-switch-when="variable"
522 >{{subject.variableName}}</span
525 ng-switch-when="customVariable"
528 vm_cc.variablesById[subject.VariableId].name
531 <span ng-switch-when="keyValue">
533 <span ng-switch="description.keyType">
534 <span ng-switch-when="string"
535 >{{subject.keyContent}}</span
538 ng-switch-when="variable"
540 >{{subject.variableName}}</span
543 ng-switch-when="customVariable"
546 vm_cc.variablesById[subject.VariableId].name
551 <span ng-switch-default
552 >{{subject.content}}</span
558 ng-if="!vm_cc.crudPermissions.readOnly"
562 class="md-icon-button"
565 translate-attr-aria-label="INTEGRATIONS.MORE"
566 ng-click="$mdOpenMenu($event)"
569 md-font-icon="icon-dots-vertical"
573 <md-menu-content width="3">
575 ng-if="vm_cc.crudPermissions.canEdit"
578 ng-click="vm_cc.createOrEditSubject($event, subject)"
579 translate="INTEGRATIONS.EDIT_SUBJECT"
585 ng-if="vm_cc.crudPermissions.canDelete"
588 ng-click="vm_cc.deleteSubjectConfirm($event, subject)"
589 translate="INTEGRATIONS.DELETE_SUBJECT"
600 </md-table-container>
606 <span translate="INTEGRATIONS.DESCRIPTIONS"
612 class="md-table-toolbar md-default no-padding"
613 ng-hide="vm_cc.selectedDescriptions.length"
615 <div class="md-toolbar-tools">
618 on-search="vm_cc.query.description = query"
619 on-collapse="vm_cc.query.description = undefined"
623 ng-if="vm_cc.crudPermissions.canEdit"
624 class="md-icon-button"
625 ng-click="vm_cc.createOrEditDescription($event)"
626 aria-label="add description"
628 translate-attr-label="INTEGRATIONS.ADD_DESCRIPTION"
630 <md-icon md-font-icon="icon-plus"></md-icon>
635 class="md-table-toolbar md-accent"
636 ng-show="vm_cc.selectedDescriptions.length"
638 <div class="md-toolbar-tools">
639 <span class="md-subhead"
640 >{{vm_cc.selectedDescriptions.length}}
641 {{vm_cc.selectedDescriptions.length > 1 ? 'items' :
642 'item'}} selected</span
646 ng-if="vm_cc.crudPermissions.canDelete"
647 class="md-icon-button"
648 ng-click="vm_cc.deleteSelectedDescriptions($event)"
649 aria-label="delete selected"
651 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
653 <md-icon md-font-icon="icon-delete"></md-icon>
658 class="md-whiteframe-1dp padding-horizontal"
664 ng-model="vm_cc.selectedDescriptions"
669 {{ 'INTEGRATIONS.ID' | translate }}
672 {{ 'INTEGRATIONS.TYPE' | translate }}
675 {{ 'INTEGRATIONS.CONTENT' | translate }}
677 <th md-column width="10px"></th>
683 md-select="description"
685 ng-repeat="description in vm_cc.descriptions | filter: vm_cc.query.description"
688 ng-click="vm_cc.createOrEditDescription($event, description)"
695 ng-click="vm_cc.createOrEditDescription($event, description)"
699 <span ng-if="description.FieldId"
700 >{{description.nameField ||
701 description.idField}}</span
703 <span ng-if="!description.FieldId"
704 >{{description.type}}</span
708 ng-switch="description.type"
709 ng-click="vm_cc.createOrEditDescription($event, description)"
712 <span ng-switch-when="string"
713 >{{description.content}}</span
716 ng-switch-when="variable"
718 >{{description.variableName}}</span
721 ng-switch-when="customVariable"
724 vm_cc.variablesById[description.VariableId].name
727 <span ng-switch-when="keyValue">
729 <span ng-switch="description.keyType">
730 <span ng-switch-when="string"
731 >{{description.keyContent}}</span
734 ng-switch-when="variable"
736 >{{description.variableName}}</span
739 ng-switch-when="customVariable"
742 vm_cc.variablesById[description.VariableId].name
747 <span ng-switch-default
748 >{{description.content}}</span
754 ng-if="!vm_cc.crudPermissions.readOnly"
758 class="md-icon-button"
761 translate-attr-aria-label="INTEGRATIONS.MORE"
762 ng-click="$mdOpenMenu($event)"
765 md-font-icon="icon-dots-vertical"
769 <md-menu-content width="3">
771 ng-if="vm_cc.crudPermissions.canEdit"
774 ng-click="vm_cc.createOrEditDescription($event, description)"
775 translate="INTEGRATIONS.EDIT_DESCRIPTION"
781 ng-if="vm_cc.crudPermissions.canDelete"
784 ng-click="vm_cc.deleteDescriptionConfirm($event, description)"
785 translate="INTEGRATIONS.DELETE_DESCRIPTION"
796 </md-table-container>
802 <span translate="INTEGRATIONS.FIELDS">FIELDS</span>
806 class="md-table-toolbar md-default no-padding"
807 ng-hide="vm_cc.selectedFields.length"
809 <div class="md-toolbar-tools">
812 on-search="vm_cc.query.field = query"
813 on-collapse="vm_cc.query.field = undefined"
817 ng-if="vm_cc.crudPermissions.canEdit"
818 class="md-icon-button"
819 ng-click="vm_cc.createOrEditField($event)"
820 aria-label="add field"
822 translate-attr-label="INTEGRATIONS.ADD_FIELD"
824 <md-icon md-font-icon="icon-plus"></md-icon>
829 class="md-table-toolbar md-accent"
830 ng-show="vm_cc.selectedFields.length"
832 <div class="md-toolbar-tools">
833 <span class="md-subhead"
834 >{{vm_cc.selectedFields.length}}
835 {{vm_cc.selectedFields.length > 1 ? 'items' :
836 'item'}} selected</span
840 ng-if="vm_cc.crudPermissions.canDelete"
841 class="md-icon-button"
842 ng-click="vm_cc.deleteSelectedFields($event)"
843 aria-label="delete selected"
845 translate-attr-label="INTEGRATIONS.DELETE_SELECTED"
847 <md-icon md-font-icon="icon-delete"></md-icon>
852 class="md-whiteframe-1dp padding-horizontal"
858 ng-model="vm_cc.selectedFields"
863 {{ 'INTEGRATIONS.ID' | translate }}
866 {{ 'INTEGRATIONS.TYPE' | translate }}
869 {{ 'INTEGRATIONS.CONTENT' | translate }}
871 <th md-column width="10px"></th>
879 ng-repeat="field in vm_cc.fields | filter: vm_cc.query.field"
882 ng-click="vm_cc.createOrEditField($event, field)"
889 ng-click="vm_cc.createOrEditField($event, field)"
893 <span ng-if="field.FieldId"
894 >{{field.nameField || field.idField}}</span
896 <span ng-if="!field.FieldId"
897 >{{field.type}}</span
901 ng-switch="field.type"
902 ng-click="vm_cc.createOrEditField($event, field)"
905 <span ng-switch-when="string"
906 >{{field.content}}</span
909 ng-switch-when="variable"
911 >{{field.variableName}}</span
914 ng-switch-when="customVariable"
916 >{{ vm_cc.variablesById[field.VariableId].name
919 <span ng-switch-when="keyValue">
921 <span ng-switch="description.keyType">
922 <span ng-switch-when="string"
923 >{{field.keyContent}}</span
926 ng-switch-when="variable"
928 >{{field.variableName}}</span
931 ng-switch-when="customVariable"
934 vm_cc.variablesById[field.VariableId].name
939 <span ng-switch-default>{{field.content}}</span>
944 ng-if="!vm_cc.crudPermissions.readOnly"
948 class="md-icon-button"
951 translate-attr-aria-label="INTEGRATIONS.MORE"
952 ng-click="$mdOpenMenu($event)"
955 md-font-icon="icon-dots-vertical"
959 <md-menu-content width="3">
961 ng-if="vm_cc.crudPermissions.canEdit"
964 ng-click="vm_cc.createOrEditField($event, field)"
965 translate="INTEGRATIONS.EDIT_FIELD"
971 ng-if="vm_cc.crudPermissions.canDelete"
974 ng-click="vm_cc.deleteFieldConfirm($event, field)"
975 translate="INTEGRATIONS.DELETE_FIELD"
986 </md-table-container>
992 <span translate="INTEGRATIONS.ADVANCED">ADVANCED</span>
996 <label translate="INTEGRATIONS.MODULE_SEARCH"></label>
998 ng-model="vm_cc.salesforceConfiguration.moduleSearch"
999 ng-change="vm_cc.selectChangedAdvanced()"
1000 ng-disabled="!vm_cc.crudPermissions.canEdit"
1003 ng-value="option.key"
1004 ng-repeat="option in [{key: 'contact_lead', value: 'Contact & Lead'}, {key: 'contact', value: 'Contact'}, {key: 'lead', value: 'Lead'}]"
1005 >{{ option.value }}</md-option
1010 <label translate="INTEGRATIONS.MODULE_CREATE"></label>
1012 ng-model="vm_cc.salesforceConfiguration.moduleCreate"
1013 ng-change="vm_cc.selectChangedAdvanced()"
1014 ng-disabled="!vm_cc.crudPermissions.canEdit"
1017 ng-value="option.key"
1018 ng-repeat="option in [{key: 'nothing', value: 'Nothing'}, {key: 'contact', value: 'Contact'}, {key: 'lead', value: 'Lead'}]"
1019 >{{ option.value }}</md-option
1028 ng-if="!vm_cc.configurations.length && vm_cc.crudPermissions.canEdit"
1029 ng-click="vm_cc.createOrEditSalesforceConfiguration($event)"
1032 layout-align="center center"
1036 class="padding-20 md-whiteframe-3dp md-accent-bg"
1038 layout-align="center center"
1040 <md-button class="md-icon-button">
1041 <md-icon md-font-icon="icon-plus"></md-icon>
1044 aria-label="add configuration"
1046 translate-attr-label="INTEGRATIONS.ADD_CONFIGURATION"
1047 >ADD CONFIGURATION</span