From 94e9dc837677987863ada70f7b331615f0213757 Mon Sep 17 00:00:00 2001 From: Jonathan Hofmann Date: Wed, 6 Sep 2023 10:54:57 +0200 Subject: [PATCH] backport fix to 3.x branch --- src/collective/easyform/browser/view.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/collective/easyform/browser/view.py b/src/collective/easyform/browser/view.py index 8bdd76cd..ad7b239c 100644 --- a/src/collective/easyform/browser/view.py +++ b/src/collective/easyform/browser/view.py @@ -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. @@ -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