Changeset 7313 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 9 Dec 2011, 10:47:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py
r7250 r7313 124 124 return title 125 125 126 class CaptchaSource(BasicSourceFactory): 127 """A source for captchas. 128 """ 129 def getValues(self): 130 captchas = ['No captcha', 'ReCaptcha'] 131 try: 132 # we have to 'try' because IConfiguration can only handle 133 # interfaces from w.s.interface. 134 from waeup.sirp.browser.interfaces import ICaptchaManager 135 except: 136 return captchas 137 return sorted(getUtility(ICaptchaManager).getAvailCaptchas().keys()) 138 139 def getTitle(self, value): 140 return value 141 126 142 class IWAeUPObject(Interface): 127 143 """A WAeUP object. … … 415 431 ) 416 432 433 captcha = schema.Choice( 434 title = u'Captcha used for applicant registration pages', 435 source = CaptchaSource(), 436 default = u'No captcha', 437 required = True, 438 ) 417 439 418 440 class ISessionConfiguration(IWAeUPObject):
Note: See TracChangeset for help on using the changeset viewer.