Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert declaring cover_layout field in content type schema as readonly #762

Merged
merged 2 commits into from
Oct 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ There's a frood who really knows where his towel is.
1.6b4 (unreleased)
^^^^^^^^^^^^^^^^^^

- Nothing changed yet.
- Revert declaring ``cover_layout`` field in content type schema as ``readonly`` (fixes `#761 https://github.com/collective/collective.cover/issues/761`_).
[hvelarde]


1.6b3 (2017-10-23)
Expand Down
6 changes: 4 additions & 2 deletions src/collective/cover/models/cover.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
<default>Empty layout</default>
</field>

<field name="cover_layout" type="zope.schema.Text">
<field name="cover_layout" type="zope.schema.Text"
form:omitted="z3c.form.interfaces.IForm:true
z3c.form.interfaces.IAddForm:true
z3c.form.interfaces.IEditForm:true">
<description i18n:translate=""
>The layout to be used to render groups and tiles</description>
<title i18n:translate="">Cover Layout</title>
<readonly>True</readonly>
</field>

</schema>
Expand Down
10 changes: 10 additions & 0 deletions src/collective/cover/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,16 @@ def generate_jpeg(width, height):
return output


# FIXME: workaround for https://github.com/plone/plone.app.testing/issues/39
# Products.TinyMCE is used only in Plone 4
if not IS_PLONE_5:
autoform = ('plone.autoform', {'loadZCML': True})
tinymce = ('Products.TinyMCE', {'loadZCML': True})
products = list(PLONE_FIXTURE.products)
products.insert(products.index(tinymce), autoform)
PLONE_FIXTURE.products = tuple(products)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to do this in brasil.gov.portal if we want to update Plone.

But honestly I think this should be fixed in plone.app.testing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to keep going on with development; we have deadlines.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then put it on brasil.gov.portal.

Copy link
Member Author

@hvelarde hvelarde Nov 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



class Fixture(PloneSandboxLayer):

defaultBases = (PLONE_FIXTURE,)
Expand Down