Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #33407 -- Fixed .radiolist admin CSS. #15333

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
carltongibson marked this conversation as resolved.
Show resolved Hide resolved
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`).