feat: Add date support and simplify

This commit is contained in:
2025-06-16 23:01:12 +02:00
parent 5511d8275c
commit e132b1c9f6

View File

@@ -1,6 +1,8 @@
<!--- See https://docs.djangoproject.com/en/5.2/topics/forms/#reusable-form-templates -->
{% load custom_tags %}
{% load widget_tweaks %}
{% for field in form %}
<div class="field">
@@ -8,12 +10,13 @@
{{ field.label }}
</label>
<div class="control">
{% if field|widget_type == 'TextInput' %}
{{ field|add_class:"input" }}
{% elif field|widget_type == 'Select' %}
{% if field|widget_type == 'Select' %}
<div class="select">
{{ field }}
</div>
{% elif field|widget_type == 'dateinput' %}
{{ field|add_class:"input"|attr:"type:date" }}
{% else %}
{{ field|add_class:"input" }}
{% endif %}