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