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 ng-repeat="field in vm.fields | orderBy:'index'" layout="column">
13 <span>{{field.props.title + (field.config.required ? '*' : '')}}</span>
16 ng-class="field.props.error? 'field-description error': 'field-description'"
19 ng-if="vm.checkHTML[$index]"
20 ng-bind-html="field.props.helpText"
23 ng-if="!vm.checkHTML[$index]"
24 ng-bind-html="field.props.error || field.props.helpText | embed:{linkTarget:'_blank'}"
31 ng-repeat="error in vm.errors"
35 <i class="mdi mdi-alert mdi-24px mdi-light"></i>
36 <md-tooltip md-direction="top"
37 >{{error.message || 'Service temporarily unavailable.'}}</md-tooltip
39 <span class="chat-error-message"
40 >{{error.message || 'Service temporarily unavailable.'}}</span
47 ng-switch="field.type"
48 style="margin: 0px; padding: 0px 0px 10px 0px"
51 <div ng-switch-when="label">
56 layout-align="center center"
58 <span>{{field.value}}</span>
63 <!-- START textinput -->
64 <div ng-switch-when="input">
66 name="{{field.props.title}}"
67 ng-model="vm.form[field.props.title]"
68 placeholder="{{field.config.placeholder}}"
69 type="{{field.config.type}}"
70 ng-required="field.config.required"
73 <!-- END textinput -->
75 <!-- START textarea -->
76 <div ng-switch-when="textarea">
78 name="{{field.props.title}}"
79 ng-model="vm.form[field.props.title]"
80 placeholder="{{field.config.placeholder}}"
83 ng-required="field.config.required"
89 <div ng-switch-when="chooseFromList">
91 name="{{field.props.title}}"
92 ng-model="vm.form[field.props.title]"
93 placeholder="{{field.config.placeholder}}"
94 ng-required="field.config.required"
97 ng-repeat="option in field.options"
98 ng-value="option.value"
99 >{{option.value}}</md-option
107 ng-switch-when="multipleChoices"
108 layout="{{field.config.direction === 'vertical' ? 'row' : 'column'}}"
111 name="{{field.props.title}}"
112 ng-model="vm.form[field.props.title]"
113 ng-required="field.config.required"
114 layout="{{field.config.direction === 'vertical' ? 'row' : 'column'}}"
117 ng-repeat="option in field.options"
118 value="{{option.value}}"
120 >{{option.value}}</md-radio-button
126 <!-- START checkbox -->
127 <div ng-switch-when="checkboxes">
129 layout="{{field.config.direction === 'vertical' ? 'row' : 'column'}}"
133 aria-label="{{field.props.title}}"
134 ng-repeat="option in field.options"
135 ng-checked="vm.exists(field.props.title, option.value)"
136 ng-disabled="!vm.exists(field.props.title, option.value) && field.config.maxSelections === vm.form[field.props.title].length"
137 ng-click="vm.toggle(field.props.title, option.value)"
144 <!-- END checkbox -->
146 <!-- START agreement -->
147 <div ng-switch-when="agreement" layout="column">
150 ng-model="vm.form[field.props.title]"
151 aria-label="{{field.props.title}}"
152 ng-required="field.config.required"
154 {{field.options[0].value}}
157 <!-- END agreement -->
159 <!-- START upload -->
160 <div ng-switch-when="upload" layout="column">
161 <div layout="row" class="option-item upload-item">
162 <md-input-container class="md-block" style="margin: 0">
167 ng-init="vm.setupFileInput(field)"
169 <md-input-container flex class="md-block">
175 aria-label="fileName"
177 </md-input-container>
178 </md-input-container>
181 ng-init="vm.initUploadButton($index)"
182 class="md-raised md-accent upload-button"
183 ng-style="{'background-color': '{{settings.color_button}}', 'color': '{{settings.textColor}}'}"
184 ><md-icon class="material-icons">attach_file</md-icon
185 ><span>{{field.config.uploadFileButtonLabel}}</span></md-button
193 grid-template-columns: 8em auto;
197 ng-repeat="option in field.options"
200 ng-click="vm.removeFileItem(field, $index)"
201 class="md-icon-button"
203 <md-icon class="material-icons">close</md-icon>
205 <span class="filename-label" ng-init="vm.makeFileOptionsVisible()"
206 >{{option.name}}</span
214 ng-messages="vm.userForm[field.props.title].$error"
215 ng-show="vm.userForm[field.props.title].$touched"
218 <div ng-message="required">
219 <span>Required Field</span>
221 <div ng-message="email">
222 <span>Wrong type field</span>
225 </md-input-container>
228 <div class="offline-button-wrapper">
231 ng-if="(typeField !== 'label')"
232 title="{{settings.offline_chat_button}}"
233 ng-click="vm.submit()"
235 ng-disabled="vm.userForm.$invalid || loading"
236 ng-style="{'background-color': '{{settings.color_button}}', 'color': '{{settings.textColor}}'}"
238 {{settings.offline_chat_button}}
243 <md-content layout="row" layout-align="center end" class="white-label">
245 ng-bind-html="(settings.custom && !settings.defaultWhiteLabel) ? settings.whiteLabel : 'Powered By XCALLY' | toTrusted"
246 ng-style="{'font-size': '{{settings.fontSize}}px'}"
250 <!-- / CHAT CONTENT -->