Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#33750 closed Cleanup/optimization (fixed)

Use <div> for timezone warning in admin

Reported by: Florian Demmer Owned by: Florian Demmer
Component: contrib.admin Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by Florian Demmer)

Previously help_text was inserted as <p> in admin. This was changed in #27207 to use a <div>.

The addTimezoneWarning() function has "always" added the warning by inserting a <br> and <span>.

Also using a <div> with the help class here avoids problems with left-alignment of the inserted text (see attachment) and removes the need for the <br>.

PR: https://github.com/django/django/pull/15743

Attachments (1)

33750.jpg (5.5 KB ) - added by Florian Demmer 3 years ago.

Download all attachments as: .zip

Change History (6)

by Florian Demmer, 3 years ago

Attachment: 33750.jpg added

comment:1 by Florian Demmer, 3 years ago

Description: modified (diff)

comment:2 by Carlton Gibson, 3 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Mariusz Felisiak, 3 years ago

Owner: changed from nobody to Florian Demmer
Triage Stage: AcceptedReady for checkin

comment:4 by GitHub <noreply@…>, 3 years ago

Resolution: fixed
Status: assignedclosed

In f3e2bb0:

Fixed #33750 -- Fixed timezone warning alignment with help texts.

Previously help_text was wrapped in a paragraph, but the change to div
broke the alignment, refs #27207.

comment:5 by Carlton Gibson <carlton@…>, 2 years ago

In 6f80050:

Fixed #33781 -- Restored alignment for admin split-field timezone warnings.

Regression in f3e2bb0833105f43efc0cc6f19c8465bc1b1a785.
Refs #33750 and #27207.

Note: See TracTickets for help on using tickets.
Back to Top