Skip to content

Commit

Permalink
Fixed #33407 -- Fixed .radiolist admin CSS.
Browse files Browse the repository at this point in the history
Regression in 5942ab5.
  • Loading branch information
carltongibson committed Jan 26, 2022
1 parent a93a1ba commit 85f2a9f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
17 changes: 10 additions & 7 deletions django/contrib/admin/static/admin/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 div.radiolist label {
width: auto;
}

form ul.radiolist input[type="radio"] {
form div.radiolist input[type="radio"] {
margin: -2px 4px 0 0;
padding: 0;
}
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions django/contrib/admin/static/admin/css/responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ input[type="submit"], button {
margin-left: 15px;
}

form .aligned ul.radiolist {
form .aligned div.radiolist {
margin-left: 2px;
}

Expand Down Expand Up @@ -646,12 +646,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;
}

Expand Down
3 changes: 3 additions & 0 deletions docs/releases/4.0.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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`).

0 comments on commit 85f2a9f

Please sign in to comment.