-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom_fields_templates_survey.htm
73 lines (72 loc) · 4.63 KB
/
custom_fields_templates_survey.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.6.2/chosen.jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/chosen/1.6.2/chosen.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css">
<script type="text/html" id="field-template-survey-text">
<div class="col-sm-12">
<div class="form-group" data-bind="css: { required: true }">
<label class="control-label" data-bind="text: $data.Text"></label>
<p><small data-bind="text: $data.Description"></small></p>
<input class="form-control" type="text" data-bind="value: $data.SurveyAnswer.Value, attr: { required: true }, valueUpdate: 'keypress'" />
<small class="help-block validation-error" data-bind="validationMessage: $data.SurveyAnswer.Value"></small>
</div>
</div>
</script>
<script type="text/html" id="field-template-survey-boolean">
<div class="col-sm-12">
<div class="form-group" data-bind="css: { required: true }">
<div class="checkbox">
<label>
<input type="checkbox" data-bind="checked: $data.SurveyAnswer.Value">
<span data-bind="text: $data.Text"></span>
</label>
<p><small data-bind="text: $data.Description"></small></p>
</div>
</div>
</div>
</script>
<script type="text/html" id="field-template-survey-date">
<div class="col-sm-12">
<div class="form-group" data-bind="css: { required: true }">
<label class="control-label" data-bind="text: $data.Text, attr: { for: 'custom' + $data.Id }"></label>
<p><small data-bind="text: $data.Description"></small></p>
<input initialblankdate type="text" class="form-control" data-bind="pickadate:{ value: $data.SurveyAnswer.Value, options: $root.datePickerOptions }, attr: { id: 'custom' + $data.Id, required: true }">
<input data-bind="value: $data.SurveyAnswer.Value" type="hidden" required="required" />
<small class="help-block validation-error" data-bind="validationMessage: $data.SurveyAnswer.Value"></small>
</div>
</div>
</script>
<script type="text/html" id="field-template-survey-dropdown">
<div class="col-sm-12">
<div class="form-group" data-bind="css: { required: true }">
<label class="control-label" data-bind="text: $data.Text, attr: { for: 'custom' + $data.Id }"></label>
<p><small data-bind="text: $data.Description"></small></p>
<select data-placeholder="-" class="form-control"
data-bind="optionsCaption: '{% T Choose one %}', options: $data.AvailableOptionsArray, selectedOptions: $data.SurveyAnswer.Value, chosen: {width: '100%'}, attr: { required: true }"></select>
<small class="help-block validation-error" data-bind="validationMessage: $data.SurveyAnswer.Value"></small>
</div>
</div>
</script>
<script type="text/html" id="field-template-survey-dropdown-multi">
<div class="col-sm-12">
<div class="form-group" data-bind="css: { required: true }">
<label class="control-label" data-bind="text: $data.Text, attr: { for: 'custom' + $data.Id }"></label>
<p><small data-bind="text: $data.Description"></small></p>
<select data-placeholder="-" multiple class="form-control"
data-bind="options: $data.AvailableOptionsArray, selectedOptions: $data.SurveyAnswer.Value, chosen: {width: '100%'}, attr: { required: true }"></select>
<small class="help-block validation-error" data-bind="validationMessage: $data.SurveyAnswer.Value"></small>
</div>
</div>
</script>
<script type="text/html" id="field-template-survey-longtext">
<div class="col-sm-12">
<div class="form-group" data-bind="css: { required: true }">
<label class="control-label" data-bind="text: $data.Text, attr: { for: 'custom' + $data.Id }"></label>
<p><small data-bind="text: $data.Description"></small></p>
<textarea class="form-control" rows="3" data-bind="value: $data.SurveyAnswer.Value,, attr: { required: true }"></textarea>
<small class="help-block validation-error" data-bind="validationMessage: $data.SurveyAnswer.Value"></small>
</div>
</div>
</script>