diff options
| author | Johannes Maron <johannes@maron.family> | 2024-03-06 21:18:36 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-03-14 20:37:53 +0100 |
| commit | 8fd953f28abc95aee2e2f59c94d8c58af0d792d7 (patch) | |
| tree | 1e19bdca015140228e7d9f88406f88adf6bc907e /django | |
| parent | 710ca576816fe90c15a7e62f95074ff0bbd77f0e (diff) | |
[5.0.x] Fixed #35273 -- Fixed rendering AdminFileWidget's attributes.
Regression in 8a6c0203c4e92908c2b26ba54feba4ce7e76d081.
Backport of e69019555d683fd6a831f87cb09e3deb86e4e7c7 from main
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/admin/templates/admin/widgets/clearable_file_input.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/admin/templates/admin/widgets/clearable_file_input.html b/django/contrib/admin/templates/admin/widgets/clearable_file_input.html index ab35253a0d..8b42f192f1 100644 --- a/django/contrib/admin/templates/admin/widgets/clearable_file_input.html +++ b/django/contrib/admin/templates/admin/widgets/clearable_file_input.html @@ -1,6 +1,6 @@ {% if widget.is_initial %}<p class="file-upload">{{ widget.initial_text }}: <a href="{{ widget.value.url }}">{{ widget.value }}</a>{% if not widget.required %} <span class="clearable-file-input"> -<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}"{% include "django/forms/widgets/attrs.html" %}> +<input type="checkbox" name="{{ widget.checkbox_name }}" id="{{ widget.checkbox_id }}"{% if widget.attrs.disabled %} disabled{% endif %}{% if widget.attrs.checked %} checked{% endif %}> <label for="{{ widget.checkbox_id }}">{{ widget.clear_checkbox_label }}</label></span>{% endif %}<br> {{ widget.input_text }}:{% endif %} <input type="{{ widget.type }}" name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% if widget.is_initial %}</p>{% endif %} |
