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

backport fix to 3.x branch #413

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
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
10 changes: 7 additions & 3 deletions src/collective/easyform/browser/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,15 @@ def updateActions(self):
if "reset" in self.actions:
self.actions["reset"].title = self.context.resetLabel

def updateWidgets(self):
super(EasyFormForm, self).updateWidgets()
def markWidgets(self):
for w in self.widgets.values():
if not IEasyFormWidget.providedBy(w):
# add marker for custom widget renderer
alsoProvides(w, IEasyFormWidget)
for g in self.groups:
for w in g.widgets.values():
if not IEasyFormWidget.providedBy(w):
alsoProvides(w, IEasyFormWidget)


def formMaybeForceSSL(self):
"""Redirect to an https:// URL if the 'force SSL' option is on.
Expand All @@ -328,6 +331,7 @@ def update(self):
"""Update form - see interfaces.IForm"""
self.formMaybeForceSSL()
super(EasyFormForm, self).update()
self.markWidgets()
self.template = self.form_template
if self.request.method != "POST" or self.context.thanksPageOverride:
# go with all but default thank you page rendering
Expand Down
Loading