Uses custom date select widget for publication dates
This commit is contained in:
parent
db5f509475
commit
a701bfcf8e
5 changed files with 26 additions and 36 deletions
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>
|
Loading…
Add table
Add a link
Reference in a new issue