1 <md-dialog class="deskAccount-dialog" aria-label="New DeskAccount">
2 <form name="deskAccountForm" 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.deskAccount.name"
51 ng-messages="deskAccountForm['name'].$error"
52 ng-show="deskAccountForm['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.deskAccount.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="deskAccountForm['type'].$error"
75 ng-show="deskAccountForm['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.URI">Uri</label>
90 ng-model="vm.deskAccount.remoteUri"
95 ng-messages="deskAccountForm['remoteUri'].$error"
96 ng-show="deskAccountForm['remoteUri'].$touched"
99 <div ng-message="required">
100 <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED"
101 >Uri field is required</span
104 <div ng-message="url">
105 <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL"
106 >Uri must be a valid url http://www.xcally.com</span
110 </md-input-container>
111 <md-input-container class="md-block">
112 <label translate="INTEGRATIONS.AUTHTYPE">AuthType</label>
113 <md-select name="authType" ng-model="vm.deskAccount.authType" required>
114 <md-option ng-value="'basic'">Basic</md-option>
117 ng-messages="deskAccountForm['authType'].$error"
118 ng-show="deskAccountForm['authType'].$touched"
121 <div ng-message="required">
122 <span translate="INTEGRATIONS.ERRORS.AUTHTYPE_REQUIRED"
123 >AuthType field is required</span
127 </md-input-container>
129 ng-if="vm.deskAccount.authType == 'basic'"
132 <label translate="INTEGRATIONS.USERNAME">Username</label>
136 ng-model="vm.deskAccount.username"
141 ng-messages="deskAccountForm['username'].$error"
142 ng-show="deskAccountForm['username'].$touched"
145 <div ng-message="required">
146 <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
147 >Username field is required</span
151 </md-input-container>
154 ng-if="vm.deskAccount.authType == 'basic'"
156 <label translate="INTEGRATIONS.PASSWORD">Password</label>
160 ng-model="vm.deskAccount.password"
161 placeholder="Password"
163 translate-attr-placeholder="INTEGRATIONS.PASSWORD"
166 <div ng-messages="deskAccountForm['password'].$error" role="alert">
167 <div ng-message="required">
168 <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
169 >Password field is required</span
172 <div ng-message="pattern">
173 <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
174 >Must contain at least 8 characters, with a minimum of 1 lowercase
175 letter, 1 uppercase letter, 1 numeric character and 1 special
176 character ~!?*@#$%^&-_=+[{]}.</span
180 </md-input-container>
182 <md-input-container class="md-block">
183 <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
184 >MotionProxyAddress</label
189 ng-model="vm.deskAccount.serverUrl"
193 <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
196 ng-messages="deskAccountForm['serverUrl'].$error"
197 ng-show="deskAccountForm['serverUrl'].$touched"
200 <div ng-message="required">
201 <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
202 >MotionProxyAddress field is required</span
205 <div ng-message="url">
207 translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
208 >MotionProxyAddress must be a valid url
209 http://www.xcally.com</span
213 </md-input-container>
214 <md-input-container class="md-block">
215 <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
219 ng-model="vm.deskAccount.description"
223 ng-messages="deskAccountForm['description'].$error"
224 ng-show="deskAccountForm['description'].$touched"
227 <div ng-message="required">
228 <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
229 >Description field is required</span
233 </md-input-container>
235 <div class="error-list">
237 ng-repeat="error in vm.errors"
240 layout-align="space-between center"
243 <span class="message">{{error.message}}</span>
244 <span class="type">({{error.type}})</span>
246 <md-button class="md-icon-button">
248 md-font-icon="icon-alert-box"
249 aria-label="alert error"
259 layout-align="space-between center"
260 ng-if="!vm.crudPermissions.readOnly"
262 <div layout="row" layout-align="start center">
265 ng-if="vm.crudPermissions.canEdit && !vm.newDeskAccount"
266 ng-click="vm.saveDeskAccount()"
267 class="send-button md-accent md-raised"
268 ng-disabled="deskAccountForm.$invalid || deskAccountForm.$pristine"
270 translate="INTEGRATIONS.SAVE"
271 translate-attr-aria-label="INTEGRATIONS.SAVE"
278 ng-if="vm.crudPermissions.canEdit && vm.newDeskAccount"
279 ng-click="vm.addNewDeskAccount()"
280 class="send-button md-accent md-raised"
281 ng-disabled="deskAccountForm.$invalid"
283 translate="INTEGRATIONS.ADD_DESKACCOUNT"
284 translate-attr-aria-label="INTEGRATIONS.ADD_DESKACCOUNT"
291 class="md-icon-button"
292 ng-if="vm.crudPermissions.canDelete && !vm.newDeskAccount"
293 ng-click="vm.deleteDeskAccount($event)"
296 translate-attr-aria-label="INTEGRATIONS.DELETE"
298 <md-icon md-font-icon="icon-delete"></md-icon>
300 ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip