Subversion Repositories Applications.bazar

Rev

Rev 45 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 45 Rev 46
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: bazar.fonct.formulaire.php,v 1.5 2005-11-07 17:05:45 florian Exp $
22
// CVS : $Id: bazar.fonct.formulaire.php,v 1.6 2005-11-07 17:30:36 florian Exp $
23
/**
23
/**
24
* Formulaire
24
* Formulaire
25
*
25
*
26
* Les fonctions de mise en page des formulaire
26
* Les fonctions de mise en page des formulaire
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Florian SCHMITT <florian@ecole-et-nature.org>
30
*@author        Florian SCHMITT <florian@ecole-et-nature.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aleandre GRANIER <alexandre@tela-botanica.org>
32
*@author        Aleandre GRANIER <alexandre@tela-botanica.org>
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.5 $ $Date: 2005-11-07 17:05:45 $
34
*@version       $Revision: 1.6 $ $Date: 2005-11-07 17:30:36 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 67... Line 67...
67
	$select->setMultiple(0);
67
	$select->setMultiple(0);
68
	$select->setSelected($defaut);
68
	$select->setSelected($defaut);
69
	$formtemplate->addElement($select) ;
69
	$formtemplate->addElement($select) ;
Line 70... Line 70...
70
	
70
	
71
	//gestion des champs obligatoire
71
	//gestion des champs obligatoire
72
	$formtemplate->registerRule('saisir_liste','function','liste_choisir');
72
	//$formtemplate->registerRule('saisir_liste','function','liste_choisir');
73
	$formtemplate->addRule($nom_bdd, BAZ_CHOISIR_OBLIGATOIRE, 'saisir_liste');
73
	//$formtemplate->addRule($nom_bdd, BAZ_CHOISIR_OBLIGATOIRE , 'saisir_liste');
74
	print_r($formtemplate->getRegisteredRules());
74
	$formtemplate->addRule($nom_bdd, BAZ_CHOISIR_OBLIGATOIRE.' '.constant($label) , 'nonzero', '', 'client') ;
75
	if (isset($obligatoire)and($obligatoire==1)) {$formtemplate->addRule($nom_bdd, constant($label.'_REQUIS'), 'required', '', 'client') ;}
75
	if (isset($obligatoire)and($obligatoire==1)) {$formtemplate->addRule($nom_bdd, constant($label.'_REQUIS'), 'required', '', 'client') ;}
Line 76... Line 76...
76
}
76
}
Line 185... Line 185...
185
}
185
}
Line 186... Line 186...
186
 
186
 
187
/* +--Fin du code ----------------------------------------------------------------------------------------+
187
/* +--Fin du code ----------------------------------------------------------------------------------------+
188
*
188
*
-
 
189
* $Log: not supported by cvs2svn $
-
 
190
* Revision 1.5  2005/11/07 17:05:45  florian
-
 
191
* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires
189
* $Log: not supported by cvs2svn $
192
*
190
* Revision 1.4  2005/10/25 13:53:02  alexandre_tb
193
* Revision 1.4  2005/10/25 13:53:02  alexandre_tb
191
* ajout d'un filtre dans les formulaire texte et textelong
194
* ajout d'un filtre dans les formulaire texte et textelong
192
*
195
*
193
* Revision 1.3  2005/07/21 19:03:12  florian
196
* Revision 1.3  2005/07/21 19:03:12  florian