a17a3778b4ceba9c586c16cd72ac718092adfb6f
[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.COMMAND">Command</label>
42         <input
43           type="text"
44           name="command"
45           ng-model="vm.system.command"
46           ng-required="true"
47           autofocus
48           ng-disabled="!vm.crudPermissions.canEdit"
49         />
50
51         <div
52           ng-messages="chatWebsiteFormApp['command'].$error"
53           ng-show="chatWebsiteFormApp['command'].$touched"
54           role="alert"
55         >
56           <div ng-message="required">
57             <span translate="CHAT.ERRORS.COMMAND_REQUIRED"
58               >Command field is required</span
59             >
60           </div>
61         </div>
62       </md-input-container>
63       <md-input-container class="md-block">
64         <label translate="CHAT.VARIABLE">Variable</label>
65         <md-select
66           name="variable"
67           ng-model="vm.system.variable"
68           ng-disabled="!vm.crudPermissions.canEdit"
69         >
70           <md-option ng-value="''">None</md-option>
71           <md-option
72             ng-value="variable.name"
73             ng-repeat="variable in vm.variables"
74             ng-disabled="variable.canSelect === false"
75             >{{ variable.name }}</md-option
76           >
77         </md-select>
78         <div
79           ng-messages="chatWebsiteFormApp['variable'].$error"
80           ng-show="chatWebsiteFormApp['variable'].$touched"
81           role="alert"
82         >
83           <div ng-message="required">
84             <span translate="CHAT.ERRORS.VARIABLE_REQUIRED"
85               >Variable field is required</span
86             >
87           </div>
88         </div>
89       </md-input-container>
90
91       <div class="error-list">
92         <div
93           ng-repeat="error in vm.errors"
94           class="error"
95           layout="row"
96           layout-align="space-between center"
97         >
98           <div>
99             <span class="message">{{error.message}}</span>
100             <span class="type">({{error.type}})</span>
101           </div>
102           <md-button class="md-icon-button">
103             <md-icon
104               md-font-icon="icon-alert-box"
105               aria-label="alert error"
106               class="s16"
107             ></md-icon>
108           </md-button>
109         </div>
110       </div>
111     </md-dialog-content>
112
113     <md-dialog-actions layout="row" layout-align="space-between center">
114       <div
115         layout="row"
116         layout-align="start center"
117         ng-if="vm.crudPermissions.canEdit"
118       >
119         <md-button
120           type="submit"
121           ng-click="vm.saveChatWebsiteApp()"
122           class="send-button md-accent md-raised"
123           ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine"
124           aria-label="SAVE"
125           translate="CHAT.SAVE"
126           translate-attr-aria-label="CHAT.SAVE"
127         >
128           SAVE
129         </md-button>
130       </div>
131     </md-dialog-actions>
132   </form>
133 </md-dialog>