Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ answer newbie questions, and generally made Django that much better:
Mridul Dhall <mriduldhall1@gmail.com>
msaelices <msaelices@gmail.com>
msundstr
Muhammad Usman <muhammad.usman11914@gmail.com>
Mushtaq Ali <mushtaak@gmail.com>
Mykola Zamkovoi <nickzam@gmail.com>
Nadège Michel <michel.nadege@gmail.com>
Expand Down
3 changes: 2 additions & 1 deletion django/contrib/admin/static/admin/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ fieldset .fieldBox {

/* WIDE FIELDSETS */

.wide label {
.wide label,
.wide legend {
width: 200px;
}

Expand Down
3 changes: 2 additions & 1 deletion django/contrib/admin/static/admin/css/rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ thead th.sorted .text {

/* FORMS */

.aligned label {
.aligned label,
.aligned legend {
padding: 0 0 3px 1em;
}

Expand Down
3 changes: 3 additions & 0 deletions docs/releases/6.0.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ Bugfixes
* Fixed :exc:`AttributeError` when subclassing builtin lookups and neglecting
to :ref:`override<tuple-for-params>` ``as_sql()`` to accept any sequence
(:ticket:`36934`).

* Fixed a visual regression where fieldset legends were misaligned in the admin
(:ticket:`36920`).
10 changes: 10 additions & 0 deletions tests/admin_views/test_password_form.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.contrib.admin.tests import AdminSeleniumTestCase
from django.contrib.auth.models import User
from django.test import override_settings
from django.test.selenium import screenshot_cases
from django.urls import reverse


Expand Down Expand Up @@ -142,3 +143,12 @@ def test_change_password_for_existing_user(self):
# Only the set password submit button is visible.
self.assertIs(submit_set.is_displayed(), True)
self.assertIs(submit_unset.is_displayed(), False)

@screenshot_cases(["desktop_size", "mobile_size", "rtl", "dark", "high_contrast"])
def test_fieldset_legend_wide_alignment(self):
user_add_url = reverse("auth_test_admin:auth_user_add")
self.admin_login(username="super", password="secret")
self.selenium.get(self.live_server_url + user_add_url)

# The fieldset legend is aligned with other fields.
self.take_screenshot("fieldset_legend_wide")