3c07f6aea2ee4e58342b13603922b74549336d91
[motion-next.git] /
1 <md-dialog class="vtigerAccount-dialog" aria-label="New VtigerAccount">
2   <form name="vtigerAccountForm" 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.vtigerAccount.name"
46           ng-required="true"
47           autofocus
48         />
49
50         <div
51           ng-messages="vtigerAccountForm['name'].$error"
52           ng-show="vtigerAccountForm['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.DESCRIPTION">Description</label>
64         <input
65           type="text"
66           name="description"
67           ng-model="vm.vtigerAccount.description"
68         />
69
70         <div
71           ng-messages="vtigerAccountForm['description'].$error"
72           ng-show="vtigerAccountForm['description'].$touched"
73           role="alert"
74         >
75           <div ng-message="required">
76             <span translate="INTEGRATIONS.ERRORS.DESCRIPTION_REQUIRED"
77               >Description field is required</span
78             >
79           </div>
80         </div>
81       </md-input-container>
82       <md-input-container class="md-block">
83         <label translate="INTEGRATIONS.VTIGER_USER_NAME"
84           >vTiger_User_Name</label
85         >
86         <input
87           type="text"
88           name="username"
89           ng-model="vm.vtigerAccount.username"
90           ng-required="true"
91         />
92
93         <div
94           ng-messages="vtigerAccountForm['username'].$error"
95           ng-show="vtigerAccountForm['username'].$touched"
96           role="alert"
97         >
98           <div ng-message="required">
99             <span translate="INTEGRATIONS.ERRORS.VTIGER_USER_NAME_REQUIRED"
100               >vTiger_User_Name field is required</span
101             >
102           </div>
103         </div>
104       </md-input-container>
105       <md-input-container class="md-block">
106         <label translate="INTEGRATIONS.ACCESS_KEY">Access_Key</label>
107         <input
108           type="text"
109           name="accessKey"
110           ng-model="vm.vtigerAccount.accessKey"
111           ng-required="true"
112         />
113
114         <div
115           ng-messages="vtigerAccountForm['accessKey'].$error"
116           ng-show="vtigerAccountForm['accessKey'].$touched"
117           role="alert"
118         >
119           <div ng-message="required">
120             <span translate="INTEGRATIONS.ERRORS.ACCESS_KEY_REQUIRED"
121               >Access_Key field is required</span
122             >
123           </div>
124         </div>
125       </md-input-container>
126       <md-input-container class="md-block">
127         <label translate="INTEGRATIONS.HOST">Host</label>
128         <input
129           type="url"
130           name="remoteUri"
131           ng-model="vm.vtigerAccount.remoteUri"
132           ng-required="true"
133         />
134
135         <div
136           ng-messages="vtigerAccountForm['remoteUri'].$error"
137           ng-show="vtigerAccountForm['remoteUri'].$touched"
138           role="alert"
139         >
140           <div ng-message="required">
141             <span translate="INTEGRATIONS.ERRORS.HOST_REQUIRED"
142               >Host field is required</span
143             >
144           </div>
145           <div ng-message="url">
146             <span translate="INTEGRATIONS.ERRORS.HOST_MUST_VALID_URL"
147               >Host must be a valid url http://www.xcally.com</span
148             >
149           </div>
150         </div>
151       </md-input-container>
152       <md-input-container class="md-block">
153         <label translate="INTEGRATIONS.MOTIONPROXYADDRESS"
154           >MotionProxyAddress</label
155         >
156         <input
157           type="url"
158           name="serverUrl"
159           ng-model="vm.vtigerAccount.serverUrl"
160         />
161
162         <div class="hint">
163           <span translate="INTEGRATIONS.HELP.MOTIONPROXYADDRESS"></span>
164         </div>
165         <div
166           ng-messages="vtigerAccountForm['serverUrl'].$error"
167           ng-show="vtigerAccountForm['serverUrl'].$touched"
168           role="alert"
169         >
170           <div ng-message="required">
171             <span translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_REQUIRED"
172               >MotionProxyAddress field is required</span
173             >
174           </div>
175           <div ng-message="url">
176             <span
177               translate="INTEGRATIONS.ERRORS.MOTIONPROXYADDRESS_MUST_VALID_URL"
178               >MotionProxyAddress must be a valid url
179               http://www.xcally.com</span
180             >
181           </div>
182         </div>
183       </md-input-container>
184
185       <div class="error-list">
186         <div
187           ng-repeat="error in vm.errors"
188           class="error"
189           layout="row"
190           layout-align="space-between center"
191         >
192           <div>
193             <span class="message">{{error.message}}</span>
194             <span class="type">({{error.type}})</span>
195           </div>
196           <md-button class="md-icon-button">
197             <md-icon
198               md-font-icon="icon-alert-box"
199               aria-label="alert error"
200               class="s16"
201             ></md-icon>
202           </md-button>
203         </div>
204       </div>
205     </md-dialog-content>
206
207     <md-dialog-actions
208       layout="row"
209       layout-align="space-between center"
210       ng-if="!vm.crudPermissions.readOnly"
211     >
212       <div layout="row" layout-align="start center">
213         <md-button
214           type="submit"
215           ng-if="vm.crudPermissions.canEdit && !vm.newVtigerAccount"
216           ng-click="vm.saveVtigerAccount()"
217           class="send-button md-accent md-raised"
218           ng-disabled="vtigerAccountForm.$invalid || vtigerAccountForm.$pristine"
219           aria-label="SAVE"
220           translate="INTEGRATIONS.SAVE"
221           translate-attr-aria-label="INTEGRATIONS.SAVE"
222         >
223           SAVE
224         </md-button>
225
226         <md-button
227           type="submit"
228           ng-if="vm.crudPermissions.canEdit && vm.newVtigerAccount"
229           ng-click="vm.addNewVtigerAccount()"
230           class="send-button md-accent md-raised"
231           ng-disabled="vtigerAccountForm.$invalid"
232           aria-label="ADD"
233           translate="INTEGRATIONS.ADD_VTIGERACCOUNT"
234           translate-attr-aria-label="INTEGRATIONS.ADD_VTIGERACCOUNT"
235         >
236           ADD VTIGERACCOUNT
237         </md-button>
238       </div>
239       <div layout="row">
240         <md-button
241           class="md-icon-button"
242           ng-if="vm.crudPermissions.canDelete && !vm.newVtigerAccount"
243           ng-click="vm.deleteVtigerAccount($event)"
244           aria-label="DELETE"
245           translate
246           translate-attr-aria-label="INTEGRATIONS.DELETE"
247         >
248           <md-icon md-font-icon="icon-delete"></md-icon>
249           <md-tooltip
250             ><span translate="INTEGRATIONS.DELETE">DELETE</span></md-tooltip
251           >
252         </md-button>
253       </div>
254     </md-dialog-actions>
255   </form>
256 </md-dialog>