mirror of
https://github.com/django/django.git
synced 2025-11-24 21:00:12 +00:00
Fixed #35755 -- Hid help text of hidden fields in admin fieldsets.
Regression in 96a598356a.
This commit is contained in:
parent
b2501759eb
commit
16af0c60ed
3 changed files with 24 additions and 8 deletions
|
|
@ -349,7 +349,12 @@ class TestInline(TestDataMixin, TestCase):
|
|||
)
|
||||
response = self.client.get(url)
|
||||
self.assertInHTML(
|
||||
'<th class="column-position hidden">Position</th>',
|
||||
'<th class="column-position hidden">Position'
|
||||
'<img src="/static/admin/img/icon-unknown.svg" '
|
||||
'class="help help-tooltip" width="10" height="10" '
|
||||
'alt="(Position help_text.)" '
|
||||
'title="Position help_text.">'
|
||||
"</th>",
|
||||
response.rendered_content,
|
||||
)
|
||||
self.assertInHTML(
|
||||
|
|
@ -379,13 +384,15 @@ class TestInline(TestDataMixin, TestCase):
|
|||
self.assertInHTML(
|
||||
'<div class="flex-container fieldBox field-position hidden">'
|
||||
'<label class="inline">Position:</label>'
|
||||
'<div class="readonly">0</div></div>',
|
||||
'<div class="readonly">0</div></div>'
|
||||
'<div class="help hidden"><div>Position help_text.</div></div>',
|
||||
response.rendered_content,
|
||||
)
|
||||
self.assertInHTML(
|
||||
'<div class="flex-container fieldBox field-position hidden">'
|
||||
'<label class="inline">Position:</label>'
|
||||
'<div class="readonly">1</div></div>',
|
||||
'<div class="readonly">1</div></div>'
|
||||
'<div class="help hidden"><div>Position help_text.</div></div>',
|
||||
response.rendered_content,
|
||||
)
|
||||
|
||||
|
|
@ -407,13 +414,17 @@ class TestInline(TestDataMixin, TestCase):
|
|||
self.assertInHTML(
|
||||
'<div class="form-row hidden field-position">'
|
||||
'<div><div class="flex-container"><label>Position:</label>'
|
||||
'<div class="readonly">0</div></div></div></div>',
|
||||
'<div class="readonly">0</div></div>'
|
||||
'<div class="help hidden"><div>Position help_text.</div></div>'
|
||||
"</div></div>",
|
||||
response.rendered_content,
|
||||
)
|
||||
self.assertInHTML(
|
||||
'<div class="form-row hidden field-position">'
|
||||
'<div><div class="flex-container"><label>Position:</label>'
|
||||
'<div class="readonly">1</div></div></div></div>',
|
||||
'<div class="readonly">1</div></div>'
|
||||
'<div class="help hidden"><div>Position help_text.</div></div>'
|
||||
"</div></div>",
|
||||
response.rendered_content,
|
||||
)
|
||||
|
||||
|
|
@ -448,7 +459,12 @@ class TestInline(TestDataMixin, TestCase):
|
|||
self.assertInHTML(
|
||||
'<thead><tr><th class="original"></th>'
|
||||
'<th class="column-name required">Name</th>'
|
||||
'<th class="column-position required hidden">Position</th>'
|
||||
'<th class="column-position required hidden">Position'
|
||||
'<img src="/static/admin/img/icon-unknown.svg" '
|
||||
'class="help help-tooltip" width="10" height="10" '
|
||||
'alt="(Position help_text.)" '
|
||||
'title="Position help_text.">'
|
||||
"</th>"
|
||||
"<th>Delete?</th></tr></thead>",
|
||||
response.rendered_content,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue