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

Use AutoExtensibleForm in both Plone 5 and Plone 4 (when applicable) #12

Merged
merged 1 commit into from
Aug 23, 2016

Conversation

seanupton
Copy link
Member

When Plone 4 has plone.app.widgets installed, use AutoExtensibleForm, which will make TinyMCE from plone.app.widgets 1.x work properly in the Plone 4 context. Effectively makes the plone.app.widgets 1.x behavior more closely match Plone 5.

USE_AUTOFORM = IAutoExtensibleForm.implementedBy(base.AddForm) or PLONE5
try:
import plone.app.widgets # noqa
USE_PAE = True
Copy link
Member

Choose a reason for hiding this comment

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

What does USE_PAE stand for - why not e.g. USE_PAW (Plone.App.Widgets)?

Copy link
Member Author

Choose a reason for hiding this comment

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

@petri While this indeed a typo, you are commenting on code from a reverted commit within this pull request; please review the final changes.

Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Would be wise to rebase the commits to remove reverted commits then

Copy link
Member Author

Choose a reason for hiding this comment

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

@gforcada good idea, done. Dropped two (revert) commits, squashed the others. Checks pass.

CC: @petri

1.x is installed, with form hints to ensure TinyMCE configuration
matches that generated in plone.app.widgets.
@jensens
Copy link
Sponsor Member

jensens commented Aug 23, 2016

This master branch is not used in buildout.coredev 4 anymore (it sticks to 2.x). So the code of this PR is not tested with 4.x - is this intended? If yes I'am ok merging this, since the tested parts are working in 5.0/5.1.

@seanupton
Copy link
Member Author

@jensens Plone 4.x use is intended, and seems to work well. This is a prerequsite for plone/plone.app.widgets#144 (1.x branch of plone.app.widgets) TinyMCE to work properly (configured) with static text portlet.

Essentially, this feature detects either PLONE5 or plone.app.widgets 1.x -- if either is present, AutoExtensibleForm is used and widget directive points to correct widget (either from plone.app.z3cform in Plone 5.x OOTB of plone.app.widgets.dx in Plone 4 integration).

A merge would be appreciated. Thanks.

@jensens jensens merged commit e07d754 into plone:master Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants