Skip to content

Commit

Permalink
Merge branch 'main' into add-block-types-index-zcatalog
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli authored Jun 29, 2023
2 parents 537ac1a + 7cc7813 commit a7e659f
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
12 changes: 12 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ Changelog
.. towncrier release notes start
4.0.9 (2023-06-22)
------------------

Bug fixes:


- Let the migration-form @@migrate_to_volto transform richtext to slate-blocks by default.
[pbauer] (#122)
- Fix value of unchecked checkboxes in migrate_to_volto.
[pbauer] (#124)


4.0.8 (2023-03-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def readfile(name):

setup(
name="plone.volto",
version="4.0.9.dev0",
version="4.0.10.dev0",
description="Volto integration add-on for Plone",
long_description=long_description,
# Get more from https://pypi.org/classifiers/
Expand Down
3 changes: 3 additions & 0 deletions src/plone/volto/browser/migrate_to_volto.pt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
</p>

<div class="form-check mb-3">
<input name="migrate_folders:boolean:default" type="hidden" value="" />
<input
class="form-check-input"
type="checkbox"
Expand All @@ -68,6 +69,7 @@
</div>

<div class="form-check mb-3 ms-4">
<input name="migrate_default_pages:boolean:default" type="hidden" value="" />
<input
class="form-check-input"
type="checkbox"
Expand All @@ -86,6 +88,7 @@
</div>

<div class="form-check mb-3">
<input name="purge_richtext:boolean:default" type="hidden" value="" />
<input
class="form-check-input"
type="checkbox"
Expand Down
4 changes: 2 additions & 2 deletions src/plone/volto/browser/migrate_to_volto.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def __call__(self):
self.migrate_folders = request.get("migrate_folders", True)
self.migrate_default_pages = request.get("migrate_default_pages", True)
self.purge_richtext = request.get("purge_richtext", True)
# We still use draftjs at the moment
self.slate = request.get("slate", False)
# We can still use outdated draftjs by setting slate to False on the request
self.slate = request.get("slate", True)

if not self.request.form.get("form.submitted", False):
return self.index()
Expand Down
1 change: 0 additions & 1 deletion src/plone/volto/tests/test_migrate_to_volto.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ def test_richtext_is_migrated(self):

view = self.portal.restrictedTraverse("@@migrate_to_volto")
self.request.form["form.submitted"] = True
self.request.form["slate"] = True
view()

doc = self.portal["doc"]
Expand Down

0 comments on commit a7e659f

Please sign in to comment.