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 14:03:09 +0100 |
| commit | e69019555d683fd6a831f87cb09e3deb86e4e7c7 (patch) | |
| tree | c2e47134e5ba851f4ea48b2daa17b30de2441c7c /django | |
| parent | 175b04942afaff978013db61495f3b39ea12989b (diff) | |
Fixed #35273 -- Fixed rendering AdminFileWidget's attributes.
Regression in 8a6c0203c4e92908c2b26ba54feba4ce7e76d081.
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 %} |
