f7ea94b7d349660f592e91b77b6ad16544d8143d
[motion-next.git] /
1 <md-dialog
2   class="openchannelAccount-dialog"
3   aria-label="New OpenchannelAccount"
4 >
5   <form name="openchannelAccountForm" 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="OPENCHANNEL.NAME">Name</label>
45         <input
46           type="text"
47           name="name"
48           ng-model="vm.openchannelAccount.name"
49           ng-required="true"
50           autofocus
51           ng-disabled="!vm.newOpenchannelAccount"
52         />
53
54         <div
55           ng-messages="openchannelAccountForm['name'].$error"
56           ng-show="openchannelAccountForm['name'].$touched"
57           role="alert"
58         >
59           <div ng-message="required">
60             <span translate="OPENCHANNEL.ERRORS.NAME_REQUIRED"
61               >Name field is required</span
62             >
63           </div>
64         </div>
65       </md-input-container>
66       <md-input-container class="md-block">
67         <label translate="OPENCHANNEL.KEY">key</label>
68         <input
69           type="text"
70           name="key"
71           ng-model="vm.openchannelAccount.key"
72           md-maxlength="5"
73           ng-required="true"
74         />
75
76         <div
77           ng-messages="openchannelAccountForm['key'].$error"
78           ng-show="openchannelAccountForm['key'].$touched"
79           role="alert"
80         >
81           <div ng-message="required">
82             <span translate="OPENCHANNEL.ERRORS.KEY_REQUIRED"
83               >key field is required</span
84             >
85           </div>
86           <div ng-message="md-maxlength">
87             <span
88               translate="OPENCHANNEL.ERRORS.KEY_MAX_LENGTH"
89               translate-values="{max: 5}"
90               >key must have a maximum length equal to 5</span
91             >
92           </div>
93         </div>
94       </md-input-container>
95       <md-input-container class="md-block">
96         <label translate="OPENCHANNEL.REPLYURI">replyUri</label>
97         <input
98           type="url"
99           name="replyUri"
100           ng-model="vm.openchannelAccount.replyUri"
101         />
102
103         <div class="hint">
104           <span translate="OPENCHANNEL.HELP.REPLYURI"></span>
105         </div>
106         <div
107           ng-messages="openchannelAccountForm['replyUri'].$error"
108           ng-show="openchannelAccountForm['replyUri'].$touched"
109           role="alert"
110         >
111           <div ng-message="required">
112             <span translate="OPENCHANNEL.ERRORS.REPLYURI_REQUIRED"
113               >replyUri field is required</span
114             >
115           </div>
116           <div ng-message="url">
117             <span translate="OPENCHANNEL.ERRORS.REPLYURI_MUST_VALID_URL"
118               >replyUri must be a valid url http://www.xcally.com</span
119             >
120           </div>
121         </div>
122       </md-input-container>
123       <md-input-container class="md-block">
124         <label translate="OPENCHANNEL.LIST">List</label>
125         <md-select
126           name="ListId"
127           ng-model="vm.openchannelAccount.ListId"
128           required
129         >
130           <md-option
131             ng-value="ListId.id"
132             ng-repeat="ListId in vm.lists"
133             ng-disabled="ListId.canSelect === false"
134             >{{ ListId.name }}</md-option
135           >
136         </md-select>
137         <div class="hint"><span translate="OPENCHANNEL.HELP.LIST"></span></div>
138         <div
139           ng-messages="openchannelAccountForm['ListId'].$error"
140           ng-show="openchannelAccountForm['ListId'].$touched"
141           role="alert"
142         >
143           <div ng-message="required">
144             <span translate="OPENCHANNEL.ERRORS.LIST_REQUIRED"
145               >List field is required</span
146             >
147           </div>
148         </div>
149       </md-input-container>
150       <md-input-container class="md-block">
151         <label translate="OPENCHANNEL.DESCRIPTION">Description</label>
152         <input
153           type="text"
154           name="description"
155           ng-model="vm.openchannelAccount.description"
156         />
157
158         <div
159           ng-messages="openchannelAccountForm['description'].$error"
160           ng-show="openchannelAccountForm['description'].$touched"
161           role="alert"
162         >
163           <div ng-message="required">
164             <span translate="OPENCHANNEL.ERRORS.DESCRIPTION_REQUIRED"
165               >Description field is required</span
166             >
167           </div>
168         </div>
169       </md-input-container>
170
171       <div class="error-list">
172         <div
173           ng-repeat="error in vm.errors"
174           class="error"
175           layout="row"
176           layout-align="space-between center"
177         >
178           <div>
179             <span class="message">{{error.message}}</span>
180             <span class="type">({{error.type}})</span>
181           </div>
182           <md-button class="md-icon-button">
183             <md-icon
184               md-font-icon="icon-alert-box"
185               aria-label="alert error"
186               class="s16"
187             ></md-icon>
188           </md-button>
189         </div>
190       </div>
191     </md-dialog-content>
192
193     <md-dialog-actions
194       layout="row"
195       layout-align="space-between center"
196       ng-if="!vm.crudPermissions.readOnly"
197     >
198       <div layout="row" layout-align="start center">
199         <md-button
200           type="submit"
201           ng-if="vm.crudPermissions.canEdit && !vm.newOpenchannelAccount"
202           ng-click="vm.saveOpenchannelAccount()"
203           class="send-button md-accent md-raised"
204           ng-disabled="openchannelAccountForm.$invalid || openchannelAccountForm.$pristine"
205           aria-label="SAVE"
206           translate="OPENCHANNEL.SAVE"
207           translate-attr-aria-label="OPENCHANNEL.SAVE"
208         >
209           SAVE
210         </md-button>
211
212         <md-button
213           type="submit"
214           ng-if="vm.crudPermissions.canEdit && vm.newOpenchannelAccount"
215           ng-click="vm.addNewOpenchannelAccount()"
216           class="send-button md-accent md-raised"
217           ng-disabled="openchannelAccountForm.$invalid"
218           aria-label="ADD"
219           translate="OPENCHANNEL.ADD_OPENCHANNELACCOUNT"
220           translate-attr-aria-label="OPENCHANNEL.ADD_OPENCHANNELACCOUNT"
221         >
222           ADD OPENCHANNELACCOUNT
223         </md-button>
224       </div>
225       <div layout="row">
226         <md-button
227           class="md-icon-button"
228           ng-if="vm.crudPermissions.canDelete && !vm.newOpenchannelAccount"
229           ng-click="vm.deleteOpenchannelAccount($event)"
230           aria-label="DELETE"
231           translate
232           translate-attr-aria-label="OPENCHANNEL.DELETE"
233         >
234           <md-icon md-font-icon="icon-delete"></md-icon>
235           <md-tooltip
236             ><span translate="OPENCHANNEL.DELETE">DELETE</span></md-tooltip
237           >
238         </md-button>
239       </div>
240     </md-dialog-actions>
241   </form>
242 </md-dialog>