From f3e2bb0833105f43efc0cc6f19c8465bc1b1a785 Mon Sep 17 00:00:00 2001 From: Florian Demmer Date: Wed, 1 Jun 2022 11:41:15 +0200 Subject: [PATCH] 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. --- .../contrib/admin/static/admin/js/admin/DateTimeShortcuts.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js b/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js index 9bad0f54cb..ea8c155d74 100644 --- a/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js +++ b/django/contrib/admin/static/admin/js/admin/DateTimeShortcuts.js @@ -90,10 +90,9 @@ } message = interpolate(message, [timezoneOffset]); - const warning = document.createElement('span'); - warning.className = warningClass; + const warning = document.createElement('div'); + warning.classList.add('help', warningClass); warning.textContent = message; - inp.parentNode.appendChild(document.createElement('br')); inp.parentNode.appendChild(warning); }, // Add clock widget to a given field