273f6674eca6bcdbdc200ab76216cb6e7d35f680
[motion-next.git] /
1 <md-dialog class="whatsappAccount-dialog" aria-label="New WhatsappAccount">
2   <form name="whatsappAccountFormApp" 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="WHATSAPP.TAG">Tag</label>
42         <md-select
43           name="tag"
44           ng-model="vm.tag.tag"
45           autofocus
46           required
47           ng-disabled="!vm.crudPermissions.canEdit"
48         >
49           <md-option
50             ng-value="tag.name"
51             ng-repeat="tag in vm.tags"
52             ng-disabled="tag.canSelect === false"
53             >{{ tag.name }}</md-option
54           >
55         </md-select>
56         <div
57           ng-messages="whatsappAccountFormApp['tag'].$error"
58           ng-show="whatsappAccountFormApp['tag'].$touched"
59           role="alert"
60         >
61           <div ng-message="required">
62             <span translate="WHATSAPP.ERRORS.TAG_REQUIRED"
63               >Tag field is required</span
64             >
65           </div>
66         </div>
67       </md-input-container>
68
69       <div class="error-list">
70         <div
71           ng-repeat="error in vm.errors"
72           class="error"
73           layout="row"
74           layout-align="space-between center"
75         >
76           <div>
77             <span class="message">{{error.message}}</span>
78             <span class="type">({{error.type}})</span>
79           </div>
80           <md-button class="md-icon-button">
81             <md-icon
82               md-font-icon="icon-alert-box"
83               aria-label="alert error"
84               class="s16"
85             ></md-icon>
86           </md-button>
87         </div>
88       </div>
89     </md-dialog-content>
90
91     <md-dialog-actions layout="row" layout-align="space-between center">
92       <div
93         layout="row"
94         layout-align="start center"
95         ng-if="vm.crudPermissions.canEdit"
96       >
97         <md-button
98           type="submit"
99           ng-click="vm.saveWhatsappAccountApp()"
100           class="send-button md-accent md-raised"
101           ng-disabled="whatsappAccountFormApp.$invalid || whatsappAccountFormApp.$pristine"
102           aria-label="SAVE"
103           translate="WHATSAPP.SAVE"
104           translate-attr-aria-label="WHATSAPP.SAVE"
105         >
106           SAVE
107         </md-button>
108       </div>
109     </md-dialog-actions>
110   </form>
111 </md-dialog>