Changeset 3849e0 in indico


Ignore:
Timestamp:
03/23/11 17:33:20 (2 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
v0.97-series
Children:
a7f492
Parents:
2bc230
git-author:
Jose Benito <jose.benito.gonzalez@…> (03/16/11 14:46:59)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (03/23/11 17:33:20)
Message:

[FIX] Checking max length for abstract fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/webinterface/rh/conferenceModif.py

    r76686a r3849e0  
    71067106        self._fieldCaption = params.get("fieldCaption", "") 
    71077107        self._fieldMaxLength = params.get("fieldMaxLength", 0) 
     7108        if self._fieldMaxLength.strip() == "": 
     7109            self._fieldMaxLength = 0 
     7110        try: 
     7111            self._fieldMaxLength = int(self._fieldMaxLength) 
     7112        except ValueError: 
     7113            raise FormValuesError(_("The field Max Length must be a number")) 
    71087114        self._fieldIsMandatory = params.get("fieldIsMandatory", False) 
    71097115        self._fieldType = params.get("fieldType", "textarea") 
Note: See TracChangeset for help on using the changeset viewer.