Changeset 13235
- Timestamp:
- 28 Aug 2015, 07:49:07 (9 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser_templates/applicantscontainermanagepage.pt
r13217 r13235 90 90 <tal:showNoApplicants condition="not: view/showApplicants"> 91 91 <p i18n:translate="note_acmp"> 92 There are more than 5000 application records in this container.92 There are more than 1000 application records in this container. 93 93 In order to prevent from downloading big amounts of data, the 94 94 Applicants tab has been disabled. Please use the -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py
r13218 r13235 29 29 from waeup.kofa.schema import TextLineChoice, FormattedDate 30 30 from waeup.kofa.interfaces import ( 31 IKofaObject, validate_email, 31 IKofaObject, validate_email, validate_html, 32 32 SimpleKofaVocabulary) 33 33 from waeup.kofa.interfaces import MessageFactory as _ … … 177 177 title = _(u'Human readable description in HTML format'), 178 178 required = False, 179 constraint=validate_html, 179 180 default = u'''This text can been seen by anonymous users. 180 181 Here we put multi-lingual general information about the application procedure. … … 243 244 title = _(u'Human readable description in HTML format'), 244 245 required = False, 246 constraint=validate_html, 245 247 default = u'''This text can been seen by anonymous users. 246 248 Here we put multi-lingual information about the study courses provided, the application procedure and deadlines. … … 277 279 title = _(u'Human readable notice on application slip in HTML format'), 278 280 required = False, 279 )280 281 constraint=validate_html, 282 ) 281 283 282 284 hidden= schema.Bool( -
main/waeup.kofa/trunk/src/waeup/kofa/documents/interfaces.py
r13167 r13235 19 19 from zope import schema 20 20 from waeup.kofa.interfaces import ( 21 IKofaObject, validate_id, 21 IKofaObject, validate_id, validate_html, 22 22 ContextualDictSourceFactoryBase) 23 23 from waeup.kofa.interfaces import MessageFactory as _ … … 82 82 title = _(u'Multilingual content in HTML format'), 83 83 required = False, 84 constraint=validate_html, 84 85 ) 85 86 -
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r13211 r13235 179 179 return True 180 180 181 # Define a validation method for HTML fields 182 class NotHTMLValue(schema.ValidationError): 183 __doc__ = u"Style or script elements not allowed" 184 185 def validate_html(value): 186 if '<style' in value or '<script' in value: 187 raise NotHTMLValue(value) 188 return True 189 181 190 # Define a validation method for international phone numbers 182 191 class InvalidPhoneNumber(schema.ValidationError): … … 650 659 required = False, 651 660 default = default_html_frontpage, 661 constraint=validate_html, 652 662 ) 653 663
Note: See TracChangeset for help on using the changeset viewer.