diff options
| author | Adam Johnson <me@adamj.eu> | 2024-04-18 13:52:53 +0200 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-04-19 11:28:02 +0200 |
| commit | 0fc832676cd585fa420d583937b5b2318bc2c629 (patch) | |
| tree | 983b332b0eab84e9be3174828da7e6490df6b214 | |
| parent | 1d85b416aa1382e7274e718c79b83dd050fb24ab (diff) | |
[4.2.x] Fixed #34994, Fixed #35386 -- Applied checkbox-row CSS class unconditionally in Admin.
Backport of bdd76c4c3817d8e3ed5b0450d5e18e4eae096f16 from main.
| -rw-r--r-- | django/contrib/admin/templates/admin/includes/fieldset.html | 2 | ||||
| -rw-r--r-- | docs/releases/4.2.12.txt | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/django/contrib/admin/templates/admin/includes/fieldset.html b/django/contrib/admin/templates/admin/includes/fieldset.html index 9a4372f791..04e76055ce 100644 --- a/django/contrib/admin/templates/admin/includes/fieldset.html +++ b/django/contrib/admin/templates/admin/includes/fieldset.html @@ -9,7 +9,7 @@ {% for field in line %} <div> {% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %} - <div class="flex-container{% if not line.fields|length == 1 %} fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}{% elif field.is_checkbox %} checkbox-row{% endif %}"> + <div class="flex-container{% if not line.fields|length == 1 %} fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if not field.is_readonly and field.errors %} errors{% endif %}{% if field.field.is_hidden %} hidden{% endif %}{% endif %}{% if field.is_checkbox %} checkbox-row{% endif %}"> {% if field.is_checkbox %} {{ field.field }}{{ field.label_tag }} {% else %} diff --git a/docs/releases/4.2.12.txt b/docs/releases/4.2.12.txt index 64a6832d59..7423dd8745 100644 --- a/docs/releases/4.2.12.txt +++ b/docs/releases/4.2.12.txt @@ -12,3 +12,7 @@ Bugfixes * Fixed a crash in Django 4.2 when validating email max line lengths with content decoded using the ``surrogateescape`` error handling scheme (:ticket:`35361`). + +* Fixed a regression in Django 4.2 where multiple checkboxes in the admin would + be centered on narrower screen widths (:ticket:`34994`) or have misaligned + labels (:ticket:`35386`). |
