-
Notifications
You must be signed in to change notification settings - Fork 2k
/
dictionary_form.html
40 lines (34 loc) · 1.5 KB
/
dictionary_form.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
{% import 'macros/form.html' as form %}
<h2>{{ _( "Field {num}.").format(num=position) }} {{ field.id }} ({{ field.type }})</h2>
{#
Data Dictionary fields may be added this snippet. New fields following
the 'info__' ~ position ~ '__namegoeshere' convention will be saved
as part of the "info" object on the column.
#}
{% block form_fields %}
{{ form.input('info__' ~ position ~ '__label',
label=_('Label'), id='field-f' ~ position ~ 'label',
value=field.get('info', {}).get('label', ''), classes=['control-full']) }}
<div class="ddict-description collapse">
{{ form.markdown('info__' ~ position ~ '__notes',
label=_('Description'), id='field-d' ~ position ~ 'notes',
value=field.get('info', {}).get('notes', '')) }}
</div>
<div class="ddict-type-override collapse">
{{ form.select('info__' ~ position ~ '__type_override',
label=_('Type Override'), options=[
{'name': '', 'value': ''},
{'name': 'text', 'value': 'text'},
{'name': 'numeric', 'value': 'numeric'},
{'name': 'timestamp', 'value': 'timestamp'},
], selected=field.get('info', {}).get('type_override', '')) }}
</div>
<div class="ddict-view-filter collapse">
{{ form.select('info__' ~ position ~ '__view_filter',
label=_('View Filter'), options=[
{'name': '', 'value': ''},
{'name': 'autocomplete', 'value': _('autocomplete')},
{'name': 'search', 'value': _('search')},
], selected=field.get('info', {}).get('view_filter', '')) }}
</div>
{% endblock %}