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 ng-show="field.type !== 'label'">
17 {{field.props.title + (field.config.required ? '*' : '')}}
21 ng-class="field.props.error ? 'field-description error': 'field-description'"
24 ng-if="vm.checkHTML[$index]"
25 ng-bind-html="field.props.helpText"
28 ng-if="!vm.checkHTML[$index]"
29 ng-bind-html="field.props.error || field.props.helpText | embed:{linkTarget:'_blank'}"
36 ng-repeat="error in vm.errors"
40 <i class="mdi mdi-alert mdi-24px mdi-light"></i>
41 <md-tooltip md-direction="top"
42 >{{error.message || 'Service temporarily unavailable.'}}</md-tooltip
44 <span class="chat-error-message"
45 >{{error.message || 'Service temporarily unavailable.'}}</span
52 ng-switch="field.type"
56 <div ng-switch-when="label">
60 layout-align="center center"
61 data-ng-bind-html="vm.trustAsHtml(field.value)"
67 <!-- START textinput -->
68 <div ng-switch-when="input">
70 name="{{field.props.title}}"
71 ng-model="vm.form[field.props.title]"
72 placeholder="{{field.config.placeholder}}"
73 type="{{field.config.type}}"
74 ng-required="field.config.required"
77 <!-- END textinput -->
79 <!-- START textarea -->
80 <div ng-switch-when="textarea">
82 name="{{field.props.title}}"
83 ng-model="vm.form[field.props.title]"
84 placeholder="{{field.config.placeholder}}"
87 ng-required="field.config.required"
93 <div ng-switch-when="chooseFromList">
95 name="{{field.props.title}}"
96 ng-model="vm.form[field.props.title]"
97 placeholder="{{field.config.placeholder}}"
98 ng-required="field.config.required"
101 ng-repeat="option in field.options"
102 ng-value="option.value"
103 >{{option.value}}</md-option
111 ng-switch-when="multipleChoices"
112 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
115 name="{{field.props.title}}"
116 ng-model="vm.form[field.props.title]"
117 ng-required="field.config.required"
118 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
121 ng-repeat="option in field.options"
122 ng-value="option.value"
124 >{{option.value}}</md-radio-button
130 <!-- START checkbox -->
131 <div ng-switch-when="checkboxes">
133 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
137 aria-label="{{field.props.title}}"
138 ng-repeat="option in field.options"
139 ng-checked="vm.exists(field.props.title, option.value)"
140 ng-disabled="!vm.exists(field.props.title, option.value) && field.config.maxSelections === vm.form[field.props.title].length"
141 ng-click="vm.toggle(field.props.title, option.value)"
148 <!-- END checkbox -->
150 <!-- START agreement -->
152 ng-switch-when="agreement"
153 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
157 ng-model="vm.form[field.props.title]"
158 aria-label="{{field.props.title}}"
159 ng-required="field.config.required"
161 {{field.options[0].value}}
164 <!-- END agreement -->
167 ng-messages="vm.userForm[field.props.title].$error"
168 ng-show="vm.userForm[field.props.title].$touched"
171 <div ng-message="required">
172 <span>Required Field</span>
174 <div ng-message="email">
175 <span>Wrong type field</span>
178 </md-input-container>
181 <div class="online-button-wrapper">
184 title="{{settings.start_chat_button}}"
186 ng-click="vm.submit()"
187 ng-disabled="vm.userForm.$invalid || vm.disableItem"
188 ng-style="{'background-color': '{{settings.color_button}}', 'color': '{{settings.textButtonColor || settings.textColor}}'}"
190 {{settings.start_chat_button}}
195 <md-content layout="row" layout-align="center end" class="white-label">
197 ng-bind-html="(settings.custom && !settings.defaultWhiteLabel) ? settings.whiteLabel : 'Powered By XCALLY' | toTrusted"
198 ng-style="{'font-size': '{{settings.fontSize}}px'}"
202 <!-- / CHAT CONTENT -->