ff5b70f51abf3f423eaedf08cea84d213c0e9dec
[motion-next.git] /
1 <md-dialog class="sugarcrmAccount-dialog" aria-label="New SugarcrmAccount">
2   <form name="sugarcrmAccountForm" class="md-inline-form" novalidate>
3     <md-toolbar class="md-accent md-hue-2">
4       <div
5         class="md-toolbar-tools"
6         layout="row"
7         layout-align="space-between center"
8       >
9         <span class="title">{{ vm.title | translate }}</span>
10         <md-button class="md-icon-button" ng-click="vm.closeDialog()">
11           <md-icon
12             md-font-icon="icon-close"
13             aria-label="Close dialog"
14           ></md-icon>
15         </md-button>
16       </div>
17     </md-toolbar>
18
19     <md-dialog-content ms-scroll>
20       <div class="error-list">
21         <div
22           ng-repeat="error in vm.errors"
23           class="error"
24           layout="row"
25           layout-align="space-between center"
26         >
27           <div>
28             <span class="message">{{error.message}}</span>
29             <span class="type">({{error.type}})</span>
30           </div>
31           <md-button class="md-icon-button">
32             <md-icon
33               md-font-icon="icon-alert-box"
34               aria-label="alert error"
35               class="s16"
36             ></md-icon>
37           </md-button>
38         </div>
39       </div>
40       <md-input-container class="md-block">
41         <label translate="INTEGRATIONS.NAME">Name</label>
42         <input
43           type="text"
44           name="name"
45           ng-model="vm.sugarcrmAccount.name"
46           ng-required="true"
47           autofocus
48         />
49
50         <div
51           ng-messages="sugarcrmAccountForm['name'].$error"
52           ng-show="sugarcrmAccountForm['name'].$touched"
53           role="alert"
54         >
55           <div ng-message="required">
56             <span translate="INTEGRATIONS.ERRORS.NAME_REQUIRED"
57               >Name field is required</span
58             >
59           </div>
60         </div>
61       </md-input-container>
62       <md-input-container class="md-block">
63         <label translate="INTEGRATIONS.USERNAME">Username</label>
64         <input
65           type="text"
66           name="username"
67           ng-model="vm.sugarcrmAccount.username"
68           ng-required="true"
69         />
70
71         <div
72           ng-messages="sugarcrmAccountForm['username'].$error"
73           ng-show="sugarcrmAccountForm['username'].$touched"
74           role="alert"
75         >
76           <div ng-message="required">
77             <span translate="INTEGRATIONS.ERRORS.USERNAME_REQUIRED"
78               >Username field is required</span
79             >
80           </div>
81         </div>
82       </md-input-container>
83       <md-input-container class="md-block">
84         <label translate="INTEGRATIONS.URI">Uri</label>
85         <input
86           type="url"
87           name="remoteUri"
88           ng-model="vm.sugarcrmAccount.remoteUri"
89           ng-required="true"
90         />
91
92         <div
93           ng-messages="sugarcrmAccountForm['remoteUri'].$error"
94           ng-show="sugarcrmAccountForm['remoteUri'].$touched"
95           role="alert"
96         >
97           <div ng-message="required">
98             <span translate="INTEGRATIONS.ERRORS.URI_REQUIRED"
99               >Uri field is required</span
100             >
101           </div>
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
105             >
106           </div>
107         </div>
108       </md-input-container>
109       <md-input-container class="md-block">
110         <label translate="INTEGRATIONS.PASSWORD">Password</label>
111         <input
112           type="password"
113           name="password"
114           ng-model="vm.sugarcrmAccount.password"
115           placeholder="Password"
116           translate
117           translate-attr-placeholder="INTEGRATIONS.PASSWORD"
118           required
119         />
120         <div ng-messages="sugarcrmAccountForm['password'].$error" role="alert">
121           <div ng-message="required">
122             <span translate="INTEGRATIONS.ERRORS.PASSWORD_REQUIRED"
123               >Password field is required</span
124             >
125           </div>
126           <div ng-message="pattern">
127             <span translate="INTEGRATIONS.ERRORS.SECURE_PASSWORD_PATTERN"
128               >Must contain at least 8 characters, with a minimum of 1 lowercase
129               letter, 1 uppercase letter, 1 numeric character and 1 special
130               character ~!?*@#$%^&-_=+[{]}.</span
131             >
132           </div>
133         </div>
134       </md-input-container>
135
136       <md-input-container class="md-block">
137         <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
138           >MotionProxyAddress</label
139         >
140         <input
141           type="url"
142           name="serverUrl"
143           ng-model="vm.sugarcrmAccount.serverUrl"
144         />
145
146         <div class="hint">
147           <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
148         </div>
149         <div
150           ng-messages="sugarcrmAccountForm['serverUrl'].$error"
151           ng-show="sugarcrmAccountForm['serverUrl'].$touched"
152           role="alert"
153         >
154           <div ng-message="required">
155             <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
156               >MotionProxyAddress field is required</span
157             >
158           </div>
159           <div ng-message="url">
160             <span
161               translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
162               >MotionProxyAddress must be a valid url
163               http://www.xcally.com</span
164             >
165           </div>
166         </div>
167       </md-input-container>
168       <md-input-container class="md-block">
169         <label translate="INTEGRATIONS.DESCRIPTION">Description</label>
170         <input
171           type="text"
172           name="description"
173           ng-model="vm.sugarcrmAccount.description"
174         />
175
176         <div
177           ng-messages="sugarcrmAccountForm['description'].$error"
178           ng-show="sugarcrmAccountForm['description'].$touched"
179           role="alert"
180         >
181           <div ng-message="required">
182             <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
183               >Description field is required</span
184             >
185           </div>
186         </div>
187       </md-input-container>
188
189       <div class="error-list">
190         <div
191           ng-repeat="error in vm.errors"
192           class="error"
193           layout="row"
194           layout-align="space-between center"
195         >
196           <div>
197             <span class="message">{{error.message}}</span>
198             <span class="type">({{error.type}})</span>
199           </div>
200           <md-button class="md-icon-button">
201             <md-icon
202               md-font-icon="icon-alert-box"
203               aria-label="alert error"
204               class="s16"
205             ></md-icon>
206           </md-button>
207         </div>
208       </div>
209     </md-dialog-content>
210
211     <md-dialog-actions
212       layout="row"
213       layout-align="space-between center"
214       ng-if="!vm.crudPermissions.readOnly"
215     >
216       <div layout="row" layout-align="start center">
217         <md-button
218           type="submit"
219           ng-if="vm.crudPermissions.canEdit && !vm.newSugarcrmAccount"
220           ng-click="vm.saveSugarcrmAccount()"
221           class="send-button md-accent md-raised"
222           ng-disabled="sugarcrmAccountForm.$invalid || sugarcrmAccountForm.$pristine"
223           aria-label="SAVE"
224           translate="INTEGRATIONS.SAVE"
225           translate-attr-aria-label="INTEGRATIONS.SAVE"
226         >
227           SAVE
228         </md-button>
229
230         <md-button
231           type="submit"
232           ng-if="vm.crudPermissions.canEdit && vm.newSugarcrmAccount"
233           ng-click="vm.addNewSugarcrmAccount()"
234           class="send-button md-accent md-raised"
235           ng-disabled="sugarcrmAccountForm.$invalid"
236           aria-label="ADD"
237           translate="INTEGRATIONS.ADD_SUGARCRMACCOUNT"
238           translate-attr-aria-label="INTEGRATIONS.ADD_SUGARCRMACCOUNT"
239         >
240           ADD SUGARCRMACCOUNT
241         </md-button>
242       </div>
243       <div layout="row">
244         <md-button
245           class="md-icon-button"
246           ng-if="vm.crudPermissions.canDelete && !vm.newSugarcrmAccount"
247           ng-click="vm.deleteSugarcrmAccount($event)"
248           aria-label="DELETE"
249           translate
250           translate-attr-aria-label="INTEGRATIONS.DELETE"
251         >
252           <md-icon md-font-icon="icon-delete"></md-icon>
253           <md-tooltip
254             ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip
255           >
256         </md-button>
257       </div>
258     </md-dialog-actions>
259   </form>
260 </md-dialog>