1 <md-dialog class="freshdeskAccount-dialog" aria-label="New FreshdeskAccount">
2 <form name="freshdeskAccountForm" 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.freshdeskAccount.name"
51 ng-messages="freshdeskAccountForm['name'].$error"
52 ng-show="freshdeskAccountForm['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.USERNAME">Username</label>
67 ng-model="vm.freshdeskAccount.username"
72 ng-messages="freshdeskAccountForm['username'].$error"
73 ng-show="freshdeskAccountForm['username'].$touched"
76 <div ng-message="required">
77 <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
78 >Username field is required</span
83 <md-input-container class="md-block">
84 <label translate="INTEGRATIONS.URI">Uri</label>
88 ng-model="vm.freshdeskAccount.remoteUri"
93 ng-messages="freshdeskAccountForm['remoteUri'].$error"
94 ng-show="freshdeskAccountForm['remoteUri'].$touched"
97 <div ng-message="required">
98 <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED"
99 >Uri field is required</span
102 <div ng-message="url">
103 <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL"
104 >Uri must be a valid url http://www.xcally.com</span
108 </md-input-container>
109 <md-input-container class="md-block">
110 <label translate="INTEGRATIONS.APIKEY">ApiKey</label>
114 ng-model="vm.freshdeskAccount.apiKey"
119 ng-messages="freshdeskAccountForm['apiKey'].$error"
120 ng-show="freshdeskAccountForm['apiKey'].$touched"
123 <div ng-message="required">
124 <span translate="INTEGRATIONS.ERRORS.APIKEY_REQUIRED"
125 >ApiKey field is required</span
129 </md-input-container>
130 <md-input-container class="md-block">
131 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
132 >MotionProxyAddress</label
137 ng-model="vm.freshdeskAccount.serverUrl"
141 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
144 ng-messages="freshdeskAccountForm['serverUrl'].$error"
145 ng-show="freshdeskAccountForm['serverUrl'].$touched"
148 <div ng-message="required">
149 <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
150 >MotionProxyAddress field is required</span
153 <div ng-message="url">
155 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
156 >MotionProxyAddress must be a valid url
157 http://www.xcally.com</span
161 </md-input-container>
162 <md-input-container class="md-block">
163 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
167 ng-model="vm.freshdeskAccount.description"
171 ng-messages="freshdeskAccountForm['description'].$error"
172 ng-show="freshdeskAccountForm['description'].$touched"
175 <div ng-message="required">
176 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
177 >Description field is required</span
181 </md-input-container>
183 <div class="error-list">
185 ng-repeat="error in vm.errors"
188 layout-align="space-between center"
191 <span class="message">{{error.message}}</span>
192 <span class="type">({{error.type}})</span>
194 <md-button class="md-icon-button">
196 md-font-icon="icon-alert-box"
197 aria-label="alert error"
207 layout-align="space-between center"
208 ng-if="!vm.crudPermissions.readOnly"
210 <div layout="row" layout-align="start center">
213 ng-if="vm.crudPermissions.canEdit && !vm.newFreshdeskAccount"
214 ng-click="vm.saveFreshdeskAccount()"
215 class="send-button md-accent md-raised"
216 ng-disabled="freshdeskAccountForm.$invalid || freshdeskAccountForm.$pristine"
218 translate="INTEGRATIONS.SAVE"
219 translate-attr-aria-label="INTEGRATIONS.SAVE"
226 ng-if="vm.crudPermissions.canEdit && vm.newFreshdeskAccount"
227 ng-click="vm.addNewFreshdeskAccount()"
228 class="send-button md-accent md-raised"
229 ng-disabled="freshdeskAccountForm.$invalid"
231 translate="INTEGRATIONS.ADD_FRESHDESKACCOUNT"
232 translate-attr-aria-label="INTEGRATIONS.ADD_FRESHDESKACCOUNT"
239 class="md-icon-button"
240 ng-if="vm.crudPermissions.canDelete && !vm.newFreshdeskAccount"
241 ng-click="vm.deleteFreshdeskAccount($event)"
244 translate-attr-aria-label="INTEGRATIONS.DELETE"
246 <md-icon md-font-icon="icon-delete"></md-icon>
248 ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip