Fix widget attrs being dropped from rendered inputs, and redesign the referee PDF
field.html's "input" branch rendered type/class/name/value/placeholder only, silently dropping every other widget attr -- so a NumberInput's step="any" (added to let the per-km rate take values like 0.083) never reached the page, and the browser fell back to whole-number-only validation. Pass widget attrs through the same way the "select" branch already does. Also gives the referee payment PDF a proper visual pass (accent header, an info card for the game details, a real fee/km table with a grand-total row) instead of the plain label/dotted-line layout, and lets the dashboard tile show assigned referees with a "referee form" download button per tile. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
name="{{ field.html_name }}"
|
||||
value="{% if field.widget_type == "date" or field.widget_type == "datetime" %}{% if field.value|date:"c"|default:"" != "" %}{{ field.value|date:"c"|default:"" }}{% else %}{{ field.value|default:"" }}{% endif %}{% else %}{% if field.value == None %}{{ field.value|default:"" }}{% else %}{{ field.value }}{% endif %}{% endif %}"
|
||||
{% if show_placeholder %}placeholder="{{ field.label|capfirst }}"{% endif %}
|
||||
{% for attr, value in field.field.widget.attrs.items %}{% if attr != "type" %}{{ attr }}="{{ value }}" {% endif %}{% endfor %}
|
||||
/>
|
||||
|
||||
{% elif field_type == "checkbox" %}
|
||||
|
||||
Reference in New Issue
Block a user