2 <md-content class="chat-online">
4 ng-if="vm.fields.length"
7 ng-style="{'font-size': '{{settings.fontSize}}px'}"
10 <div class="form-input-container">
12 ng-repeat="field in vm.fields | orderBy:'index'"
16 <span>{{field.props.title + (field.config.required ? '*' : '')}}</span>
19 ng-class="field.props.error? 'field-description error': 'field-description'"
22 ng-if="vm.checkHTML[$index]"
23 ng-bind-html="field.props.helpText"
26 ng-if="!vm.checkHTML[$index]"
27 ng-bind-html="field.props.error || field.props.helpText | embed:{linkTarget:'_blank'}"
34 ng-repeat="error in vm.errors"
38 <i class="mdi mdi-alert mdi-24px mdi-light"></i>
39 <md-tooltip md-direction="top"
40 >{{error.message || 'Service temporarily unavailable.'}}</md-tooltip
42 <span class="chat-error-message"
43 >{{error.message || 'Service temporarily unavailable.'}}</span
48 <md-input-container md-no-float ng-switch="field.type">
50 <div ng-switch-when="label">
55 layout-align="center center"
57 <span>{{field.value}}</span>
62 <!-- START textinput -->
63 <div ng-switch-when="input">
65 name="{{field.props.title}}"
66 ng-model="vm.form[field.props.title]"
67 placeholder="{{field.config.placeholder}}"
68 type="{{field.config.type}}"
69 ng-required="field.config.required"
72 <!-- END textinput -->
74 <!-- START textarea -->
75 <div ng-switch-when="textarea">
77 name="{{field.props.title}}"
78 ng-model="vm.form[field.props.title]"
79 placeholder="{{field.config.placeholder}}"
82 ng-required="field.config.required"
88 <div ng-switch-when="chooseFromList">
90 name="{{field.props.title}}"
91 ng-model="vm.form[field.props.title]"
92 placeholder="{{field.config.placeholder}}"
93 ng-required="field.config.required"
96 ng-repeat="option in field.options"
97 ng-value="option.value"
98 >{{option.value}}</md-option
106 ng-switch-when="multipleChoices"
107 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
110 name="{{field.props.title}}"
111 ng-model="vm.form[field.props.title]"
112 ng-required="field.config.required"
113 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
116 ng-repeat="option in field.options"
117 ng-value="option.value"
119 >{{option.value}}</md-radio-button
125 <!-- START checkbox -->
126 <div ng-switch-when="checkboxes">
128 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
132 aria-label="{{field.props.title}}"
133 ng-repeat="option in field.options"
134 ng-checked="vm.exists(field.props.title, option.value)"
135 ng-disabled="!vm.exists(field.props.title, option.value) && field.config.maxSelections === vm.form[field.props.title].length"
136 ng-click="vm.toggle(field.props.title, option.value)"
143 <!-- END checkbox -->
145 <!-- START agreement -->
147 ng-switch-when="agreement"
148 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
152 ng-model="vm.form[field.props.title]"
153 aria-label="{{field.props.title}}"
154 ng-required="field.config.required"
156 {{field.options[0].value}}
159 <!-- END agreement -->
162 ng-messages="vm.userForm[field.props.title].$error"
163 ng-show="vm.userForm[field.props.title].$touched"
166 <div ng-message="required">
167 <span>Required Field</span>
169 <div ng-message="email">
170 <span>Wrong type field</span>
173 </md-input-container>
176 <div class="online-button-wrapper">
179 title="{{settings.start_chat_button}}"
181 ng-click="vm.submit()"
182 ng-disabled="vm.userForm.$invalid || vm.disableItem"
183 ng-style="{'background-color': '{{settings.color_button}}', 'color': '{{settings.textColor}}'}"
185 {{settings.start_chat_button}}
190 <md-content layout="row" layout-align="center end" class="white-label">
192 ng-bind-html="(settings.custom && !settings.defaultWhiteLabel) ? settings.whiteLabel : 'Powered By XCALLY' | toTrusted"
193 ng-style="{'font-size': '{{settings.fontSize}}px'}"
197 <!-- / CHAT CONTENT -->