# HG changeset patch # User Thierry Florac # Date 1571835095 -7200 # Node ID 29368086be32df7769359e1b985e2063fb319637 # Parent 9b74ed7d16cd35deffd419868f3769210d7487f4 Version 0.1.46.1 diff -r 9b74ed7d16cd -r 29368086be32 buildout.cfg --- a/buildout.cfg Mon Oct 21 11:49:29 2019 +0200 +++ b/buildout.cfg Wed Oct 23 14:51:35 2019 +0200 @@ -79,4 +79,4 @@ eggs = pyams_default_theme [test] [versions] -pyams_default_theme = 0.1.46 +pyams_default_theme = 0.1.46.1 diff -r 9b74ed7d16cd -r 29368086be32 docs/HISTORY.txt --- a/docs/HISTORY.txt Mon Oct 21 11:49:29 2019 +0200 +++ b/docs/HISTORY.txt Wed Oct 23 14:51:35 2019 +0200 @@ -1,6 +1,10 @@ History ======= +0.1.46.1 +-------- + - fixed error in form's captcha + 0.1.46 ------ - added width and offset to image map paragraph default renderer settings diff -r 9b74ed7d16cd -r 29368086be32 setup.py --- a/setup.py Mon Oct 21 11:49:29 2019 +0200 +++ b/setup.py Wed Oct 23 14:51:35 2019 +0200 @@ -22,7 +22,7 @@ README = os.path.join(DOCS, 'README.txt') HISTORY = os.path.join(DOCS, 'HISTORY.txt') -version = '0.1.46' +version = '0.1.46.1' long_description = open(README).read() + '\n\n' + open(HISTORY).read() tests_require = [] diff -r 9b74ed7d16cd -r 29368086be32 src/pyams_default_theme.egg-info/PKG-INFO --- a/src/pyams_default_theme.egg-info/PKG-INFO Mon Oct 21 11:49:29 2019 +0200 +++ b/src/pyams_default_theme.egg-info/PKG-INFO Wed Oct 23 14:51:35 2019 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pyams-default-theme -Version: 0.1.46 +Version: 0.1.46.1 Summary: PyAMS default theme Home-page: http://hg.ztfy.org/pyams/pyams_default_theme Author: Thierry Florac @@ -11,6 +11,10 @@ History ======= + 0.1.46.1 + -------- + - fixed error in form's captcha + 0.1.46 ------ - added width and offset to image map paragraph default renderer settings diff -r 9b74ed7d16cd -r 29368086be32 src/pyams_default_theme/shared/form/__init__.py --- a/src/pyams_default_theme/shared/form/__init__.py Mon Oct 21 11:49:29 2019 +0200 +++ b/src/pyams_default_theme/shared/form/__init__.py Wed Oct 23 14:51:35 2019 +0200 @@ -86,18 +86,20 @@ def fields(self): def get_fields(): + form = self.context token = TextLine(title=_("CSRF token"), required=True) token.__name__ = CSRF_FIELD_NAME yield token - if self.context.use_captcha: + captcha_settings = form.get_captcha_settings() + if captcha_settings.get('use_captcha'): captcha = TextLine(title=_("Captcha"), required=True) captcha.__name__ = RECAPTCHA_FIELD_NAME yield captcha - yield from IFormFieldContainer(self.context).get_fields() + yield from IFormFieldContainer(form).get_fields() if self.context.rgpd_consent: consent = Bool(title=' ', - description=II18n(self.context).query_attribute('rgpd_warning', - request=self.request), + description=II18n(form).query_attribute('rgpd_warning', + request=self.request), required=True, default=False) consent.__name__ = RGPD_CONSENT_FIELD_NAME