fa4ab00ffa616f2a4b8e8d52437841417e79ddea
[motion-next.git] /
1 <md-dialog class="mailAccount-dialog" aria-label="New MailAccount">
2   <form name="mailAccountFormApp" 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="MAIL.CONDITION">Condition</label>
42         <input
43           type="text"
44           name="condition"
45           ng-model="vm.gotoif.condition"
46           ng-required="true"
47           autofocus
48           ng-disabled="!vm.crudPermissions.canEdit"
49         />
50
51         <div
52           ng-messages="mailAccountFormApp['condition'].$error"
53           ng-show="mailAccountFormApp['condition'].$touched"
54           role="alert"
55         >
56           <div ng-message="required">
57             <span translate="MAIL.ERRORS.CONDITION_REQUIRED"
58               >Condition field is required</span
59             >
60           </div>
61         </div>
62       </md-input-container>
63       <md-input-container class="md-block">
64         <label translate="MAIL.TRUEPRIORITY">truepriority</label>
65         <input
66           type="number"
67           name="truepriority"
68           ng-model="vm.gotoif.truepriority"
69           min="1"
70           ng-required="true"
71           ng-disabled="!vm.crudPermissions.canEdit"
72         />
73
74         <div
75           ng-messages="mailAccountFormApp['truepriority'].$error"
76           ng-show="mailAccountFormApp['truepriority'].$touched"
77           role="alert"
78         >
79           <div ng-message="required">
80             <span translate="MAIL.ERRORS.TRUEPRIORITY_REQUIRED"
81               >truepriority field is required</span
82             >
83           </div>
84           <div ng-message="min">
85             <span
86               translate="MAIL.ERRORS.TRUEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
87               >truepriority must be a valid greater or equal than</span
88             >
89             <span>1</span>
90           </div>
91         </div>
92       </md-input-container>
93       <md-input-container class="md-block">
94         <label translate="MAIL.FALSEPRIORITY">falsepriority</label>
95         <input
96           type="number"
97           name="falsepriority"
98           ng-model="vm.gotoif.falsepriority"
99           min="1"
100           ng-required="true"
101           ng-disabled="!vm.crudPermissions.canEdit"
102         />
103
104         <div
105           ng-messages="mailAccountFormApp['falsepriority'].$error"
106           ng-show="mailAccountFormApp['falsepriority'].$touched"
107           role="alert"
108         >
109           <div ng-message="required">
110             <span translate="MAIL.ERRORS.FALSEPRIORITY_REQUIRED"
111               >falsepriority field is required</span
112             >
113           </div>
114           <div ng-message="min">
115             <span
116               translate="MAIL.ERRORS.FALSEPRIORITY_MUST_BE_GREATER_THAN_OR_EQUAL_TO"
117               >falsepriority must be a valid greater or equal than</span
118             >
119             <span>1</span>
120           </div>
121         </div>
122       </md-input-container>
123
124       <div class="error-list">
125         <div
126           ng-repeat="error in vm.errors"
127           class="error"
128           layout="row"
129           layout-align="space-between center"
130         >
131           <div>
132             <span class="message">{{error.message}}</span>
133             <span class="type">({{error.type}})</span>
134           </div>
135           <md-button class="md-icon-button">
136             <md-icon
137               md-font-icon="icon-alert-box"
138               aria-label="alert error"
139               class="s16"
140             ></md-icon>
141           </md-button>
142         </div>
143       </div>
144     </md-dialog-content>
145
146     <md-dialog-actions layout="row" layout-align="space-between center">
147       <div
148         layout="row"
149         layout-align="start center"
150         ng-if="vm.crudPermissions.canEdit"
151       >
152         <md-button
153           type="submit"
154           ng-click="vm.saveMailAccountApp()"
155           class="send-button md-accent md-raised"
156           ng-disabled="mailAccountFormApp.$invalid || mailAccountFormApp.$pristine"
157           aria-label="SAVE"
158           translate="MAIL.SAVE"
159           translate-attr-aria-label="MAIL.SAVE"
160         >
161           SAVE
162         </md-button>
163       </div>
164     </md-dialog-actions>
165   </form>
166 </md-dialog>