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.3 2005-07-21 19:03:12 florian Exp $
|
22 |
// CVS : $Id: bazar.fonct.formulaire.php,v 1.4 2005-10-25 13:53:02 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Inscription
|
24 |
* Inscription
|
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.3 $ $Date: 2005-07-21 19:03:12 $
|
34 |
*@version $Revision: 1.4 $ $Date: 2005-10-25 13:53:02 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
Line 128... |
Line 128... |
128 |
$option=array('size'=>$limite1,'maxlength'=>$limite2);
|
128 |
$option=array('size'=>$limite1,'maxlength'=>$limite2);
|
129 |
$formtemplate->addElement('text', $nom_bdd, constant($label), $option) ;
|
129 |
$formtemplate->addElement('text', $nom_bdd, constant($label), $option) ;
|
130 |
//gestion des valeurs par défaut
|
130 |
//gestion des valeurs par défaut
|
131 |
$defauts=array($nom_bdd=>$defaut);
|
131 |
$defauts=array($nom_bdd=>$defaut);
|
132 |
$formtemplate->setDefaults($defauts);
|
132 |
$formtemplate->setDefaults($defauts);
|
- |
|
133 |
$formtemplate->applyFilter($nom_bdd, 'addslashes') ;
|
133 |
//gestion du champs obligatoire
|
134 |
//gestion du champs obligatoire
|
134 |
if (isset($obligatoire)and($obligatoire==1)) {$formtemplate->addRule($nom_bdd, constant($label.'_REQUIS'), 'required', '', 'client') ;}
|
135 |
if (isset($obligatoire)and($obligatoire==1)) {$formtemplate->addRule($nom_bdd, constant($label.'_REQUIS'), 'required', '', 'client') ;}
|
135 |
}
|
136 |
}
|
Line 154... |
Line 155... |
154 |
$formtexte->setWrap('HARD');
|
155 |
$formtexte->setWrap('HARD');
|
155 |
$formtemplate->addElement($formtexte) ;
|
156 |
$formtemplate->addElement($formtexte) ;
|
156 |
//gestion des valeurs par défaut
|
157 |
//gestion des valeurs par défaut
|
157 |
$defauts=array($nom_bdd=>$defaut);
|
158 |
$defauts=array($nom_bdd=>$defaut);
|
158 |
$formtemplate->setDefaults($defauts);
|
159 |
$formtemplate->setDefaults($defauts);
|
- |
|
160 |
$formtemplate->applyFilter($nom_bdd, 'addslashes') ;
|
159 |
//gestion du champs obligatoire
|
161 |
//gestion du champs obligatoire
|
160 |
if (isset($obligatoire)and($obligatoire==1)) {$formtemplate->addRule($nom_bdd, constant($label.'_REQUIS'), 'required', '', 'client') ;}
|
162 |
if (isset($obligatoire)and($obligatoire==1)) {$formtemplate->addRule($nom_bdd, constant($label.'_REQUIS'), 'required', '', 'client') ;}
|
161 |
}
|
163 |
}
|
Line 179... |
Line 181... |
179 |
$formtemplate->addElement($formhtml) ;
|
181 |
$formtemplate->addElement($formhtml) ;
|
180 |
}
|
182 |
}
|
Line 181... |
Line 183... |
181 |
|
183 |
|
182 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
184 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
183 |
*
|
185 |
*
|
- |
|
186 |
* $Log: not supported by cvs2svn $
|
- |
|
187 |
* Revision 1.3 2005/07/21 19:03:12 florian
|
- |
|
188 |
* nouveautés bazar: templates fiches, correction de bugs, ...
|
184 |
* $Log: not supported by cvs2svn $
|
189 |
*
|
185 |
* Revision 1.1.1.1 2005/02/17 18:05:11 florian
|
190 |
* Revision 1.1.1.1 2005/02/17 18:05:11 florian
|
186 |
* Import initial de Bazar
|
191 |
* Import initial de Bazar
|
187 |
*
|
192 |
*
|
188 |
* Revision 1.1.1.1 2005/02/17 11:09:50 florian
|
193 |
* Revision 1.1.1.1 2005/02/17 11:09:50 florian
|