Version 0.1.46.1 0.1.46.1
authorThierry Florac <tflorac@ulthar.net>
Wed, 23 Oct 2019 14:51:35 +0200
changeset 503 29368086be32
parent 502 9b74ed7d16cd
child 504 f0f6b7c25835
Version 0.1.46.1
buildout.cfg
docs/HISTORY.txt
setup.py
src/pyams_default_theme.egg-info/PKG-INFO
src/pyams_default_theme/shared/form/__init__.py
--- 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
--- 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
--- 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 = []
--- 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
--- 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