8ee405fae0edbd58a2cb9964691464b57c1151c7
[motion-next.git] /
1 <md-dialog class="chatWebsite-dialog" aria-label="New ChatWebsite">
2   <form name="chatWebsiteFormApp" 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="CHAT.TIMES">times</label>
42         <md-select
43           name="times"
44           ng-model="vm.autoreply.times"
45           autofocus
46           required
47           ng-disabled="!vm.crudPermissions.canEdit"
48         >
49           <md-option ng-value="1">One Time</md-option>
50           <md-option ng-value="0">Always</md-option>
51         </md-select>
52         <div
53           ng-messages="chatWebsiteFormApp['times'].$error"
54           ng-show="chatWebsiteFormApp['times'].$touched"
55           role="alert"
56         >
57           <div ng-message="required">
58             <span translate="CHAT.ERRORS.TIMES_REQUIRED"
59               >times field is required</span
60             >
61           </div>
62         </div>
63       </md-input-container>
64       <md-input-container class="md-block">
65         <label translate="CHAT.TEXT">Text</label>
66         <textarea name="text" ng-model="vm.autoreply.text" required></textarea>
67
68         <div
69           ng-messages="chatWebsiteFormApp['text'].$error"
70           ng-show="chatWebsiteFormApp['text'].$touched"
71           role="alert"
72         >
73           <div ng-message="required">
74             <span translate="CHAT.ERRORS.TEXT_REQUIRED"
75               >Text field is required</span
76             >
77           </div>
78         </div>
79       </md-input-container>
80
81       <div class="error-list">
82         <div
83           ng-repeat="error in vm.errors"
84           class="error"
85           layout="row"
86           layout-align="space-between center"
87         >
88           <div>
89             <span class="message">{{error.message}}</span>
90             <span class="type">({{error.type}})</span>
91           </div>
92           <md-button class="md-icon-button">
93             <md-icon
94               md-font-icon="icon-alert-box"
95               aria-label="alert error"
96               class="s16"
97             ></md-icon>
98           </md-button>
99         </div>
100       </div>
101     </md-dialog-content>
102
103     <md-dialog-actions layout="row" layout-align="space-between center">
104       <div
105         layout="row"
106         layout-align="start center"
107         ng-if="vm.crudPermissions.canEdit"
108       >
109         <md-button
110           type="submit"
111           ng-click="vm.saveChatWebsiteApp()"
112           class="send-button md-accent md-raised"
113           ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine"
114           aria-label="SAVE"
115           translate="CHAT.SAVE"
116           translate-attr-aria-label="CHAT.SAVE"
117         >
118           SAVE
119         </md-button>
120       </div>
121     </md-dialog-actions>
122   </form>
123 </md-dialog>