kopia lustrzana https://github.com/wagtail/wagtail
Make DraftailRichTextArea be considered as visible (#5583)
rodzic
9a21e79ff8
commit
bbec0c8bc8
|
@ -41,6 +41,7 @@ Changelog
|
|||
* Fix: Prevent new block IDs from being assigned on repeated calls to `StreamBlock.get_prep_value` (Colin Klein)
|
||||
* Fix: Prevent broken images in notification emails when static files are hosted on a remote domain (Eduard Luca)
|
||||
* Fix: Replace styleguide example avatar with default image to avoid issues when custom user model is used (Matt Westcott)
|
||||
* Fix: `DraftailRichTextArea` is no longer treated as a hidden field by Django's form logic (Sergey Fedoseev)
|
||||
|
||||
|
||||
2.6.2 (19.09.2019)
|
||||
|
|
|
@ -65,6 +65,7 @@ Bug fixes
|
|||
* Prevent new block IDs from being assigned on repeated calls to ``StreamBlock.get_prep_value`` (Colin Klein)
|
||||
* Prevent broken images in notification emails when static files are hosted on a remote domain (Eduard Luca)
|
||||
* Replace styleguide example avatar with default image to avoid issues when custom user model is used (Matt Westcott)
|
||||
* ``DraftailRichTextArea`` is no longer treated as a hidden field by Django's form logic (Sergey Fedoseev)
|
||||
|
||||
|
||||
Upgrade considerations
|
||||
|
|
|
@ -9,6 +9,7 @@ from wagtail.core.rich_text import features as feature_registry
|
|||
|
||||
class DraftailRichTextArea(widgets.HiddenInput):
|
||||
template_name = 'wagtailadmin/widgets/draftail_rich_text_area.html'
|
||||
is_hidden = False
|
||||
|
||||
# this class's constructor accepts a 'features' kwarg
|
||||
accepts_features = True
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from bs4 import BeautifulSoup
|
||||
from django.conf import settings
|
||||
from django.test import TestCase
|
||||
from django.test import SimpleTestCase, TestCase
|
||||
from django.test.utils import override_settings
|
||||
from django.urls import reverse
|
||||
|
||||
|
@ -742,3 +742,17 @@ class TestPageLinkHandler(TestCase):
|
|||
result,
|
||||
'<a data-linktype="page" data-id="%d" data-parent-id="2" href="/events/">' % events_page_id
|
||||
)
|
||||
|
||||
|
||||
class TestWidgetNotHidden(SimpleTestCase):
|
||||
def test_draftail(self):
|
||||
self.assertIs(
|
||||
DraftailRichTextArea().is_hidden,
|
||||
False,
|
||||
)
|
||||
|
||||
def test_hallo(self):
|
||||
self.assertIs(
|
||||
HalloRichTextArea().is_hidden,
|
||||
False,
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue