[Erp5-report] r34286 tatuya - /erp5/trunk/products/ERP5Form/CaptchaField.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 5 10:11:24 CEST 2010
Author: tatuya
Date: Mon Apr 5 10:11:22 2010
New Revision: 34286
URL: http://svn.erp5.org?rev=34286&view=rev
Log:
Bug #1724 : fix TALES calculations on Captcha Fields
Accessing self.values[property_id] skips all TALES/override computations, only
do it for properties that are set by the Captcha Provider.
Modified:
erp5/trunk/products/ERP5Form/CaptchaField.py
Modified: erp5/trunk/products/ERP5Form/CaptchaField.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/CaptchaField.py?rev=34286&r1=34285&r2=34286&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/CaptchaField.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/CaptchaField.py [utf8] Mon Apr 5 10:11:22 2010
@@ -312,14 +312,16 @@
security.declareProtected('Access contents information', 'get_value')
def get_value(self, id, **kw):
- if self.values.has_key(id):
+ if id in self.getCaptchaCustomPropertyList():
return self.values[id]
return ZMIField.get_value(self, id, **kw)
def getCaptchaCustomPropertyList(self):
- captcha_type = self.get_value("captcha_type")
+ if hasattr(self, "__extraPropertyList"):
+ return self.__extraPropertyList
+ captcha_type = ZMIField.get_value(self, "captcha_type")
captcha_provider = CaptchaProviderFactory.getProvider(captcha_type)
extraPropertyList = captcha_provider.getExtraPropertyList()
self.__extraPropertyList = [x.id for x in extraPropertyList]
return extraPropertyList
-
+
More information about the Erp5-report
mailing list