a91cd3b74b3146cc9343cde8951f0b4978bab7b7
[motion-next.git] /
1 <md-dialog
2   class="dynamics365Account-dialog"
3   aria-label="New Dynamics365Account"
4 >
5   <form name="dynamics365AccountForm" class="md-inline-form" novalidate>
6     <md-toolbar class="md-accent md-hue-2">
7       <div
8         class="md-toolbar-tools"
9         layout="row"
10         layout-align="space-between center"
11       >
12         <span class="title">{{ vm.title | translate }}</span>
13         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
14           <md-icon
15             md-font-icon="icon-close"
16             aria-label="Close dialog"
17           ></md-icon>
18         </md-button>
19       </div>
20     </md-toolbar>
21
22     <md-dialog-content ms-scroll>
23       <div class="error-list">
24         <div
25           ng-repeat="error in vm.errors"
26           class="error"
27           layout="row"
28           layout-align="space-between center"
29         >
30           <div>
31             <span class="message">{{error.message}}</span>
32             <span class="type">({{error.type}})</span>
33           </div>
34           <md-button class="md-icon-button">
35             <md-icon
36               md-font-icon="icon-alert-box"
37               aria-label="alert error"
38               class="s16"
39             ></md-icon>
40           </md-button>
41         </div>
42       </div>
43       <md-input-container class="md-block">
44         <label translate="INTEGRATIONS.NAME">Name</label>
45         <input
46           type="text"
47           name="name"
48           ng-model="vm.dynamics365Account.name"
49           ng-required="true"
50           autofocus
51         />
52
53         <div
54           ng-messages="dynamics365AccountForm['name'].$error"
55           ng-show="dynamics365AccountForm['name'].$touched"
56           role="alert"
57         >
58           <div ng-message="required">
59             <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
60               >Name field is required</span
61             >
62           </div>
63         </div>
64       </md-input-container>
65       <md-input-container class="md-block">
66         <label translate="INTEGRATIONS.USERNAME">Username</label>
67         <input
68           type="text"
69           name="username"
70           ng-model="vm.dynamics365Account.username"
71           ng-required="true"
72         />
73
74         <div
75           ng-messages="dynamics365AccountForm['username'].$error"
76           ng-show="dynamics365AccountForm['username'].$touched"
77           role="alert"
78         >
79           <div ng-message="required">
80             <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
81               >Username field is required</span
82             >
83           </div>
84         </div>
85       </md-input-container>
86       <md-input-container class="md-block">
87         <label translate="INTEGRATIONS.PASSWORD">Password</label>
88         <input
89           type="password"
90           name="password"
91           ng-model="vm.dynamics365Account.password"
92           placeholder="Password"
93           translate
94           translate-attr-placeholder="INTEGRATIONS.PASSWORD"
95           required
96         />
97         <div
98           ng-messages="dynamics365AccountForm['password'].$error"
99           role="alert"
100         >
101           <div ng-message="required">
102             <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
103               >Password field is required</span
104             >
105           </div>
106           <div ng-message="pattern">
107             <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
108               >Must contain at least 8 characters, with a minimum of 1 lowercase
109               letter, 1 uppercase letter, 1 numeric character and 1 special
110               character ~!?*@#$%^&-_=+[{]}.</span
111             >
112           </div>
113         </div>
114       </md-input-container>
115
116       <md-input-container class="md-block">
117         <label translate="INTEGRATIONS.URI">Uri</label>
118         <input
119           type="url"
120           name="remoteUri"
121           ng-model="vm.dynamics365Account.remoteUri"
122           ng-required="true"
123         />
124
125         <div
126           ng-messages="dynamics365AccountForm['remoteUri'].$error"
127           ng-show="dynamics365AccountForm['remoteUri'].$touched"
128           role="alert"
129         >
130           <div ng-message="required">
131             <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED"
132               >Uri field is required</span
133             >
134           </div>
135           <div ng-message="url">
136             <span translate="INTEGRATIONS.ERRORS.URI_MUST_VALID_URL"
137               >Uri must be a valid url http://www.xcally.com</span
138             >
139           </div>
140         </div>
141       </md-input-container>
142       <md-input-container class="md-block">
143         <label translate="INTEGRATIONS.TENANTID">TenantId</label>
144         <input
145           type="text"
146           name="tenantId"
147           ng-model="vm.dynamics365Account.tenantId"
148           ng-required="true"
149         />
150
151         <div
152           ng-messages="dynamics365AccountForm['tenantId'].$error"
153           ng-show="dynamics365AccountForm['tenantId'].$touched"
154           role="alert"
155         >
156           <div ng-message="required">
157             <span translate="INTEGRATIONS.ERRORS.TENANTID_REQUIRED"
158               >TenantId field is required</span
159             >
160           </div>
161         </div>
162       </md-input-container>
163       <md-input-container class="md-block">
164         <label translate="INTEGRATIONS.CLIENTID">ClientId</label>
165         <input
166           type="text"
167           name="clientId"
168           ng-model="vm.dynamics365Account.clientId"
169           ng-required="true"
170         />
171
172         <div
173           ng-messages="dynamics365AccountForm['clientId'].$error"
174           ng-show="dynamics365AccountForm['clientId'].$touched"
175           role="alert"
176         >
177           <div ng-message="required">
178             <span translate="INTEGRATIONS.ERRORS.CLIENTID_REQUIRED"
179               >ClientId field is required</span
180             >
181           </div>
182         </div>
183       </md-input-container>
184       <md-input-container class="md-block">
185         <label translate="INTEGRATIONS.CLIENTSECRET">ClientSecret</label>
186         <input
187           type="text"
188           name="clientSecret"
189           ng-model="vm.dynamics365Account.clientSecret"
190           ng-required="true"
191         />
192
193         <div
194           ng-messages="dynamics365AccountForm['clientSecret'].$error"
195           ng-show="dynamics365AccountForm['clientSecret'].$touched"
196           role="alert"
197         >
198           <div ng-message="required">
199             <span translate="INTEGRATIONS.ERRORS.CLIENTSECRET_REQUIRED"
200               >ClientSecret field is required</span
201             >
202           </div>
203         </div>
204       </md-input-container>
205       <md-input-container class="md-block">
206         <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
207           >MotionProxyAddress</label
208         >
209         <input
210           type="url"
211           name="serverUrl"
212           ng-model="vm.dynamics365Account.serverUrl"
213         />
214
215         <div class="hint">
216           <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
217         </div>
218         <div
219           ng-messages="dynamics365AccountForm['serverUrl'].$error"
220           ng-show="dynamics365AccountForm['serverUrl'].$touched"
221           role="alert"
222         >
223           <div ng-message="required">
224             <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
225               >MotionProxyAddress field is required</span
226             >
227           </div>
228           <div ng-message="url">
229             <span
230               translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
231               >MotionProxyAddress must be a valid url
232               http://www.xcally.com</span
233             >
234           </div>
235         </div>
236       </md-input-container>
237       <md-input-container class="md-block">
238         <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
239         <input
240           type="text"
241           name="description"
242           ng-model="vm.dynamics365Account.description"
243         />
244
245         <div
246           ng-messages="dynamics365AccountForm['description'].$error"
247           ng-show="dynamics365AccountForm['description'].$touched"
248           role="alert"
249         >
250           <div ng-message="required">
251             <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
252               >Description field is required</span
253             >
254           </div>
255         </div>
256       </md-input-container>
257
258       <div class="error-list">
259         <div
260           ng-repeat="error in vm.errors"
261           class="error"
262           layout="row"
263           layout-align="space-between center"
264         >
265           <div>
266             <span class="message">{{error.message}}</span>
267             <span class="type">({{error.type}})</span>
268           </div>
269           <md-button class="md-icon-button">
270             <md-icon
271               md-font-icon="icon-alert-box"
272               aria-label="alert error"
273               class="s16"
274             ></md-icon>
275           </md-button>
276         </div>
277       </div>
278     </md-dialog-content>
279
280     <md-dialog-actions
281       layout="row"
282       layout-align="space-between center"
283       ng-if="!vm.crudPermissions.readOnly"
284     >
285       <div layout="row" layout-align="start center">
286         <md-button
287           type="submit"
288           ng-if="vm.crudPermissions.canEdit && !vm.newDynamics365Account"
289           ng-click="vm.saveDynamics365Account()"
290           class="send-button md-accent md-raised"
291           ng-disabled="dynamics365AccountForm.$invalid || dynamics365AccountForm.$pristine"
292           aria-label="SAVE"
293           translate="INTEGRATIONS.SAVE"
294           translate-attr-aria-label="INTEGRATIONS.SAVE"
295         >
296           SAVE
297         </md-button>
298
299         <md-button
300           type="submit"
301           ng-if="vm.crudPermissions.canEdit && vm.newDynamics365Account"
302           ng-click="vm.addNewDynamics365Account()"
303           class="send-button md-accent md-raised"
304           ng-disabled="dynamics365AccountForm.$invalid"
305           aria-label="ADD"
306           translate="INTEGRATIONS.ADD_DYNAMICS365ACCOUNT"
307           translate-attr-aria-label="INTEGRATIONS.ADD_DYNAMICS365ACCOUNT"
308         >
309           ADD DYNAMICS365ACCOUNT
310         </md-button>
311       </div>
312       <div layout="row">
313         <md-button
314           class="md-icon-button"
315           ng-if="vm.crudPermissions.canDelete && !vm.newDynamics365Account"
316           ng-click="vm.deleteDynamics365Account($event)"
317           aria-label="DELETE"
318           translate
319           translate-attr-aria-label="INTEGRATIONS.DELETE"
320         >
321           <md-icon md-font-icon="icon-delete"></md-icon>
322           <md-tooltip
323             ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip
324           >
325         </md-button>
326       </div>
327     </md-dialog-actions>
328   </form>
329 </md-dialog>