From 41bdfec62faef65ca3f5ff3e179923f50578d004 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 7 Jan 2011 00:28:09 +0100 Subject: [PATCH] For LDAP field which are numbers, check the format in the update form --- extra/modules/store.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/extra/modules/store.py b/extra/modules/store.py index 0c76026..66e10a3 100644 --- a/extra/modules/store.py +++ b/extra/modules/store.py @@ -74,15 +74,30 @@ class IdentitiesStoreIFEF(authentic.identities.IdentitiesStoreLdap): on_register = False), # Attributs specificiques IFEF Field('numeroPassFormaAssMat', N_('Numero de pass assistante maternelle'), - read_only = True, on_register = False), + read_only = True, on_register = False, + hint = _('Entrez un nombre decimal'), + widget_class = 'ValidatedStringWidget', + regex = r'^[0-9]*$'), Field('numeroPassFormaSPE', N_('Numero de pass SPE'), read_only = True, - on_register = False), + on_register = False, + hint = _('Entrez un nombre decimal'), + widget_class = 'ValidatedStringWidget', + regex = r'^[0-9]*$'), Field('numeroURSSAF', N_('Numero URSSAF'), read_only = True, - on_register = False), + on_register = False, + hint = _('Entrez un nombre decimal'), + widget_class = 'ValidatedStringWidget', + regex = r'^[0-9]*$'), Field('numeroPAJE', N_('Numero PAJE'), read_only = True, - on_register = False), + on_register = False, + hint = _('Entrez un nombre decimal'), + widget_class = 'ValidatedStringWidget', + regex = r'^[0-9]*$'), Field('numeroIRCEM', N_('Numero IRCEM'), read_only = True, - on_register = False), + on_register = False, + hint = _('Entrez un nombre decimal'), + widget_class = 'ValidatedStringWidget', + regex = r'^[0-9]*$'), Field('orgDn', N_('DN de l\'organisme d\'affiliation'), read_only = True, multivalued = True, invisible = True, widget_class = authentic.identities.IdentitiesStoreLdap.LdapDnWidget,