2 <md-content class="chat-online">
3 <div id="toaster"></div>
6 ng-if="vm.fields.length"
9 ng-style="{'font-size': '{{settings.fontSize}}px'}"
12 <div class="form-input-container">
14 ng-repeat="field in vm.fields | orderBy:'index'"
18 <span ng-show="field.type !== 'label'">
19 {{field.props.title + (field.config.required ? '*' : '')}}
23 ng-class="field.props.error? 'field-description error': 'field-description'"
26 ng-if="vm.checkHTML[$index]"
27 ng-bind-html="field.props.helpText"
30 ng-if="!vm.checkHTML[$index]"
31 ng-bind-html="field.props.error || field.props.helpText | embed:{linkTarget:'_blank'}"
38 ng-repeat="error in vm.errors"
42 <i class="mdi mdi-alert mdi-24px mdi-light"></i>
43 <md-tooltip md-direction="top"
44 >{{error.message || 'Service temporarily unavailable.'}}</md-tooltip
46 <span class="chat-error-message"
47 >{{error.message || 'Service temporarily unavailable.'}}</span
52 <md-input-container md-no-float ng-switch="field.type">
54 <div ng-switch-when="label">
59 layout-align="center center"
60 data-ng-bind-html="vm.trustAsHtml(field.value)"
66 <!-- START textinput -->
67 <div ng-switch-when="input">
69 name="{{field.props.title}}"
70 ng-model="vm.form[field.props.title]"
71 placeholder="{{field.config.placeholder}}"
72 type="{{field.config.type}}"
73 ng-required="field.config.required"
76 <!-- END textinput -->
78 <!-- START textarea -->
79 <div ng-switch-when="textarea">
81 name="{{field.props.title}}"
82 ng-model="vm.form[field.props.title]"
83 placeholder="{{field.config.placeholder}}"
86 ng-required="field.config.required"
92 <div ng-switch-when="chooseFromList">
94 name="{{field.props.title}}"
95 ng-model="vm.form[field.props.title]"
96 placeholder="{{field.config.placeholder}}"
97 ng-required="field.config.required"
100 ng-repeat="option in field.options"
101 ng-value="option.value"
102 >{{option.value}}</md-option
110 ng-switch-when="multipleChoices"
111 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
114 name="{{field.props.title}}"
115 ng-model="vm.form[field.props.title]"
116 ng-required="field.config.required"
117 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
120 ng-repeat="option in field.options"
121 ng-value="option.value"
123 >{{option.value}}</md-radio-button
129 <!-- START checkbox -->
130 <div ng-switch-when="checkboxes">
132 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
136 aria-label="{{field.props.title}}"
137 ng-repeat="option in field.options"
138 ng-checked="vm.exists(field.props.title, option.value)"
139 ng-disabled="!vm.exists(field.props.title, option.value) && field.config.maxSelections === vm.form[field.props.title].length"
140 ng-click="vm.toggle(field.props.title, option.value)"
147 <!-- END checkbox -->
149 <!-- START agreement -->
151 ng-switch-when="agreement"
152 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
156 ng-model="vm.form[field.props.title]"
157 aria-label="{{field.props.title}}"
158 ng-required="field.config.required"
160 {{field.options[0].value}}
163 <!-- END agreement -->
165 <!-- START upload -->
166 <div ng-switch-when="upload" layout="column">
167 <div layout="row" class="option-item upload-item">
168 <md-input-container class="md-block" style="margin: 0">
173 ng-init="vm.setupFileInput(field)"
175 <md-input-container flex class="md-block">
181 aria-label="fileName"
183 </md-input-container>
184 </md-input-container>
187 ng-init="vm.initUploadButton($index)"
188 class="md-raised md-accent upload-button"
189 ng-style="{'background-color': '{{settings.color_button}}', 'color': '{{settings.textButtonColor || settings.textColor}}'}"
190 ><md-icon class="material-icons">attach_file</md-icon
191 ><span>{{field.config.uploadFileButtonLabel}}</span></md-button
199 grid-template-columns: 8em auto;
203 ng-repeat="option in field.options"
206 ng-click="vm.removeFileItem(field, $index)"
207 class="md-icon-button"
209 <md-icon class="material-icons">close</md-icon>
212 class="filename-label"
213 ng-init="vm.makeFileOptionsVisible()"
214 >{{option.name}}</span
222 ng-messages="vm.userForm[field.props.title].$error"
223 ng-show="vm.userForm[field.props.title].$touched"
226 <div ng-message="required">
227 <span>Required Field</span>
229 <div ng-message="email">
230 <span>Wrong type field</span>
233 </md-input-container>
236 <div class="offline-button-wrapper">
239 ng-if="(typeField !== 'label')"
240 title="{{settings.offline_chat_button}}"
242 ng-click="vm.submit()"
243 ng-disabled="vm.userForm.$invalid || loading"
244 ng-style="{'background-color': '{{settings.color_button}}', 'color': '{{settings.textButtonColor || settings.textColor}}'}"
246 {{settings.offline_chat_button}}
251 <md-content layout="row" layout-align="center end" class="white-label">
253 ng-bind-html="(settings.custom && !settings.defaultWhiteLabel) ? settings.whiteLabel : 'Powered By XCALLY' | toTrusted"
254 ng-style="{'font-size': '{{settings.fontSize}}px'}"
258 <!-- / CHAT CONTENT -->