8741946b508e842d10aff5867626252024e62cb0
[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.ACCESSKEYID">accesskeyid</label>
42         <input
43           type="text"
44           name="accesskeyid"
45           ng-model="vm.amazonlex.accesskeyid"
46           ng-required="true"
47           autofocus
48           ng-disabled="!vm.crudPermissions.canEdit"
49         />
50
51         <div
52           ng-messages="chatWebsiteFormApp['accesskeyid'].$error"
53           ng-show="chatWebsiteFormApp['accesskeyid'].$touched"
54           role="alert"
55         >
56           <div ng-message="required">
57             <span translate="CHAT.ERRORS.ACCESSKEYID_REQUIRED"
58               >accesskeyid field is required</span
59             >
60           </div>
61         </div>
62       </md-input-container>
63       <md-input-container class="md-block">
64         <label translate="CHAT.SECRETACCESSKEY">secretaccesskey</label>
65         <input
66           type="text"
67           name="secretaccesskey"
68           ng-model="vm.amazonlex.secretaccesskey"
69           ng-required="true"
70           ng-disabled="!vm.crudPermissions.canEdit"
71         />
72
73         <div
74           ng-messages="chatWebsiteFormApp['secretaccesskey'].$error"
75           ng-show="chatWebsiteFormApp['secretaccesskey'].$touched"
76           role="alert"
77         >
78           <div ng-message="required">
79             <span translate="CHAT.ERRORS.SECRETACCESSKEY_REQUIRED"
80               >secretaccesskey field is required</span
81             >
82           </div>
83         </div>
84       </md-input-container>
85       <md-input-container class="md-block">
86         <label translate="CHAT.LEXREGION">lexregion</label>
87         <md-select
88           name="lexregion"
89           ng-model="vm.amazonlex.lexregion"
90           required
91           ng-disabled="!vm.crudPermissions.canEdit"
92         >
93           <md-option ng-value="'us-east-1'">US East (N. Virginia)</md-option>
94           <md-option ng-value="'us-west-2'">US West (Oregon)</md-option>
95           <md-option ng-value="'eu-west-1'">EU (Ireland)</md-option>
96           <md-option ng-value="'ap-southeast-2'"
97             >Asia Pacific (Sydney)</md-option
98           >
99         </md-select>
100         <div
101           ng-messages="chatWebsiteFormApp['lexregion'].$error"
102           ng-show="chatWebsiteFormApp['lexregion'].$touched"
103           role="alert"
104         >
105           <div ng-message="required">
106             <span translate="CHAT.ERRORS.LEXREGION_REQUIRED"
107               >lexregion field is required</span
108             >
109           </div>
110         </div>
111       </md-input-container>
112       <md-input-container class="md-block">
113         <label translate="CHAT.BOTNAME">botname</label>
114         <input
115           type="text"
116           name="botname"
117           ng-model="vm.amazonlex.botname"
118           ng-required="true"
119           ng-disabled="!vm.crudPermissions.canEdit"
120         />
121
122         <div
123           ng-messages="chatWebsiteFormApp['botname'].$error"
124           ng-show="chatWebsiteFormApp['botname'].$touched"
125           role="alert"
126         >
127           <div ng-message="required">
128             <span translate="CHAT.ERRORS.BOTNAME_REQUIRED"
129               >botname field is required</span
130             >
131           </div>
132         </div>
133       </md-input-container>
134       <md-input-container class="md-block">
135         <label translate="CHAT.WELCOMEMESSAGE">welcomemessage</label>
136         <textarea
137           name="welcomemessage"
138           ng-model="vm.amazonlex.welcomemessage"
139           md-maxlength="255"
140         ></textarea>
141         <div class="hint">
142           <span translate="CHAT.HELP.WELCOMEMESSAGE"></span>
143         </div>
144
145         <div
146           ng-messages="chatWebsiteFormApp['welcomemessage'].$error"
147           ng-show="chatWebsiteFormApp['welcomemessage'].$touched"
148           role="alert"
149         >
150           <div ng-message="md-maxlength">
151             <span
152               translate="CHAT.ERRORS.WELCOMEMESSAGE_MAX_LENGTH"
153               translate-values="{max: 255}"
154               >welcomemessage must have a maximum length equal to 255</span
155             >
156           </div>
157         </div>
158       </md-input-container>
159
160       <div class="error-list">
161         <div
162           ng-repeat="error in vm.errors"
163           class="error"
164           layout="row"
165           layout-align="space-between center"
166         >
167           <div>
168             <span class="message">{{error.message}}</span>
169             <span class="type">({{error.type}})</span>
170           </div>
171           <md-button class="md-icon-button">
172             <md-icon
173               md-font-icon="icon-alert-box"
174               aria-label="alert error"
175               class="s16"
176             ></md-icon>
177           </md-button>
178         </div>
179       </div>
180     </md-dialog-content>
181
182     <md-dialog-actions layout="row" layout-align="space-between center">
183       <div
184         layout="row"
185         layout-align="start center"
186         ng-if="vm.crudPermissions.canEdit"
187       >
188         <md-button
189           type="submit"
190           ng-click="vm.saveChatWebsiteApp()"
191           class="send-button md-accent md-raised"
192           ng-disabled="chatWebsiteFormApp.$invalid || chatWebsiteFormApp.$pristine"
193           aria-label="SAVE"
194           translate="CHAT.SAVE"
195           translate-attr-aria-label="CHAT.SAVE"
196         >
197           SAVE
198         </md-button>
199       </div>
200     </md-dialog-actions>
201   </form>
202 </md-dialog>