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
50 <md-input-container md-no-float ng-switch="field.type">
52 <div ng-switch-when="label">
57 layout-align="center center"
58 data-ng-bind-html="vm.trustAsHtml(field.value)"
64 <!-- START textinput -->
65 <div ng-switch-when="input">
67 name="{{field.props.title}}"
68 ng-model="vm.form[field.props.title]"
69 placeholder="{{field.config.placeholder}}"
70 type="{{field.config.type}}"
71 ng-required="field.config.required"
74 <!-- END textinput -->
76 <!-- START textarea -->
77 <div ng-switch-when="textarea">
79 name="{{field.props.title}}"
80 ng-model="vm.form[field.props.title]"
81 placeholder="{{field.config.placeholder}}"
84 ng-required="field.config.required"
90 <div ng-switch-when="chooseFromList">
92 name="{{field.props.title}}"
93 ng-model="vm.form[field.props.title]"
94 placeholder="{{field.config.placeholder}}"
95 ng-required="field.config.required"
98 ng-repeat="option in field.options"
99 ng-value="option.value"
100 >{{option.value}}</md-option
108 ng-switch-when="multipleChoices"
109 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
112 name="{{field.props.title}}"
113 ng-model="vm.form[field.props.title]"
114 ng-required="field.config.required"
115 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
118 ng-repeat="option in field.options"
119 ng-value="option.value"
121 >{{option.value}}</md-radio-button
127 <!-- START checkbox -->
128 <div ng-switch-when="checkboxes">
130 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
134 aria-label="{{field.props.title}}"
135 ng-repeat="option in field.options"
136 ng-checked="vm.exists(field.props.title, option.value)"
137 ng-disabled="!vm.exists(field.props.title, option.value) && field.config.maxSelections === vm.form[field.props.title].length"
138 ng-click="vm.toggle(field.props.title, option.value)"
145 <!-- END checkbox -->
147 <!-- START agreement -->
149 ng-switch-when="agreement"
150 layout="{{field.config.direction === 'horizontal' ? 'row' : 'column'}}"
154 ng-model="vm.form[field.props.title]"
155 aria-label="{{field.props.title}}"
156 ng-required="field.config.required"
158 {{field.options[0].value}}
161 <!-- END agreement -->
164 ng-messages="vm.userForm[field.props.title].$error"
165 ng-show="vm.userForm[field.props.title].$touched"
168 <div ng-message="required">
169 <span>Required Field</span>
171 <div ng-message="email">
172 <span>Wrong type field</span>
175 </md-input-container>
178 <div class="online-button-wrapper">
181 title="{{settings.start_chat_button}}"
183 ng-click="vm.submit()"
184 ng-disabled="vm.userForm.$invalid || vm.disableItem"
185 ng-style="{'background-color': '{{settings.color_button}}', 'color': '{{settings.textColor}}'}"
187 {{settings.start_chat_button}}
192 <md-content layout="row" layout-align="center end" class="white-label">
194 ng-bind-html="(settings.custom && !settings.defaultWhiteLabel) ? settings.whiteLabel : 'Powered By XCALLY' | toTrusted"
195 ng-style="{'font-size': '{{settings.fontSize}}px'}"
199 <!-- / CHAT CONTENT -->