[4.0.x] Fixed #33407 -- Fixed .radiolist admin CSS.

Regression in 5942ab5eb1.

Backport of 85f2a9fb0f from main
This commit is contained in:
Carlton Gibson 2022-01-19 12:06:38 +01:00
parent c28a41f4f1
commit f82ca84f77
3 changed files with 17 additions and 10 deletions

View File

@ -37,16 +37,19 @@ label {
/* RADIO BUTTONS */
form ul.radiolist li {
list-style-type: none;
form div.radiolist div {
padding-right: 7px;
}
form ul.radiolist label {
float: none;
display: inline;
form div.radiolist.inline div {
display: inline-block;
}
form ul.radiolist input[type="radio"] {
form div.radiolist label {
width: auto;
}
form div.radiolist input[type="radio"] {
margin: -2px 4px 0 0;
padding: 0;
}
@ -106,7 +109,7 @@ form .aligned ul {
padding-left: 10px;
}
form .aligned ul.radiolist {
form .aligned div.radiolist {
display: inline-block;
margin: 0;
padding: 0;

View File

@ -232,7 +232,7 @@ input[type="submit"], button {
margin-left: 15px;
}
form .aligned ul.radiolist {
form .aligned div.radiolist {
margin-left: 2px;
}
@ -650,12 +650,13 @@ input[type="submit"], button {
padding-left: 0;
}
form .aligned ul.radiolist {
form .aligned div.radiolist {
margin-top: 5px;
margin-right: 15px;
margin-bottom: -3px;
}
form .aligned ul.radiolist:not(.inline) li + li {
form .aligned div.radiolist:not(.inline) div + div {
margin-top: 5px;
}

View File

@ -25,3 +25,6 @@ Bugfixes
* Fixed a regression in Django 4.0 that caused a crash of ``makemigrations`` on
models without ``Meta.order_with_respect_to`` but with a field named
``_order`` (:ticket:`33449`).
* Fixed a regression in Django 4.0 that caused incorrect
:attr:`.ModelAdmin.radio_fields` layout in the admin (:ticket:`33407`).