Changeset 3690 in products
- Timestamp:
- Jul 3, 2013 9:52:00 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/widget.py
r3688 r3690 72 72 key) 73 73 74 def hasInput(self): 75 # The validator looks for the captcha only if the captcha field 76 # is present. If the captcha field is omitted from the request, 77 # then the captcha validation never happens. That's why 'required' 78 # option is useless. So, we have to simulate 'required': set up 'True' 79 # for the captcha input. 80 return True 81 82 def _getFormInput(self): 83 """ It returns current form input. """ 84 # The original method isn't suitable when the captcha field 85 # is omitted from the request. 86 return self.request.get(self.name, u'') 87 74 88 def _toFieldValue(self, input): 75 89 # Captcha validation is one-time process to prevent hacking
Note: See TracChangeset
for help on using the changeset viewer.