-
Notifications
You must be signed in to change notification settings - Fork 16
/
_list.html
63 lines (54 loc) · 2.47 KB
/
_list.html
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
{% from "application_form/_value.html" import value %}
<div class="{{ f.name }}__container form__question {% if f.has_conditional %} form__subquestion {% endif %}">
<a id="question-{{ f.name }}"></a>
<label>
{% autoescape off %}{{ f.label }}{% endautoescape %}
{% if f.help("long_help") %}
<span class="form__long-help" data-feather="help-circle" aria-hidden="true" data-toggle="modal" data-target="#modal-{{ f.name }}"></span><span class="sr-only">More help</span>
{% endif %}
{% if f.has_widget("click_to_copy") %}
<span class="form__click-to-copy" id="click-to-copy--{{ f.name }}" data-feather="copy" aria-hidden="true"></span><span class="sr-only">Copy value</span>
<span class="tag tag--confirmation" style="display:none" id="copy-confirmation--{{ f.name }}">Copied!</span>
{% endif %}
{% if f.optional %}<span class="form__question--is-optional">(Optional)</span>{% endif %}
</label>
{% if f.get("hint") %}<p><small>{{ f.hint | safe }}</small></p>{% endif %}
{% if f.has_widget("multiple_field") or f.has_widget("infinite_repeat") %}
{% set add_button %}
<p class="add_field__button_div">
<button type="button" id="add_field__{{ f.name }}" class="add_field__button label" >Add</button>
</p>
{% endset %}
{% if f.repeatable.add_button_placement == "top" %}
{{ add_button }}
{% endif %}
<div class="removable-fields">
{% for entry in f.wtfield %}
{% set entry_template = f.entry_template %}
{% include entry_template %}
{% endfor %}
</div>
{% if f.repeatable.add_button_placement != "top" %}
{{ add_button }}
{% endif %}
{% else %}
{% include entry_template %}
{% endif %}
{% if f.help("render_error_box") != False %} {# some fields have custom error boxes #}
<div id="{{ f.name }}_checkbox-errors"></div>
{% endif %}
{% if form_diff %}
{% if f.help("update_requests_diff", True) and f.name in form_diff %}
<p class="alert alert--message">
<strong>WAS:</strong>
<em>
{{ value(form_diff[f.name].a, f.name, formulaic_context) }}
</em>
</p>
{% endif %}
{% endif %}
{% if f.help("short_help") %}
<p><small>{{ f.help("short_help") | safe }}</small></p>
{% endif %}
{% include "application_form/modal.html" %}
</div>