Uses custom date select widget for publication dates
This commit is contained in:
9
bookwyrm/templates/widgets/addon_multiwidget.html
Normal file
9
bookwyrm/templates/widgets/addon_multiwidget.html
Normal file
@ -0,0 +1,9 @@
|
||||
{% spaceless %}
|
||||
<div class="field has-addons">
|
||||
{% for widget in widget.subwidgets %}
|
||||
<div class="control{% if forloop.last %} is-expanded{% endif %}">
|
||||
{% include widget.template_name %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endspaceless %}
|
10
bookwyrm/templates/widgets/select.html
Normal file
10
bookwyrm/templates/widgets/select.html
Normal file
@ -0,0 +1,10 @@
|
||||
<div class="select">
|
||||
<select
|
||||
name="{{ widget.name }}"
|
||||
{% include "django/forms/widgets/attrs.html" %}
|
||||
>{% for group_name, group_choices, group_index in widget.optgroups %}{% if group_name %}
|
||||
<optgroup label="{{ group_name }}">{% endif %}{% for option in group_choices %}
|
||||
{% include option.template_name with widget=option %}{% endfor %}{% if group_name %}
|
||||
</optgroup>{% endif %}{% endfor %}
|
||||
</select>
|
||||
</div>
|
Reference in New Issue
Block a user