Line 281... |
Line 281... |
281 |
*/
|
281 |
*/
|
282 |
function texte(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire, $dans_moteur_de_recherche=0) {
|
282 |
function texte(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire, $dans_moteur_de_recherche=0) {
|
283 |
$option=array('size'=>$limite1,'maxlength'=>$limite2, 'id' => $nom_bdd);
|
283 |
$option=array('size'=>$limite1,'maxlength'=>$limite2, 'id' => $nom_bdd);
|
284 |
$formtemplate->addElement('text', $nom_bdd, $label, $option) ;
|
284 |
$formtemplate->addElement('text', $nom_bdd, $label, $option) ;
|
285 |
//gestion des valeurs par défaut
|
285 |
//gestion des valeurs par défaut
|
286 |
$defauts=array($nom_bdd=>$defaut);
|
286 |
$defauts=array($nom_bdd=>stripslashes($defaut));
|
287 |
$formtemplate->setDefaults($defauts);
|
287 |
$formtemplate->setDefaults($defauts);
|
288 |
$formtemplate->applyFilter($nom_bdd, 'addslashes') ;
|
288 |
$formtemplate->applyFilter($nom_bdd, 'addslashes') ;
|
289 |
//gestion du champs obligatoire
|
289 |
//gestion du champs obligatoire
|
290 |
if (($dans_moteur_de_recherche==0) && isset($obligatoire) && ($obligatoire==1)) {
|
290 |
if (($dans_moteur_de_recherche==0) && isset($obligatoire) && ($obligatoire==1)) {
|
291 |
$formtemplate->addRule($nom_bdd, $label.' obligatoire', 'required', '', 'client') ;
|
291 |
$formtemplate->addRule($nom_bdd, $label.' obligatoire', 'required', '', 'client') ;
|
Line 365... |
Line 365... |
365 |
$formtexte= new HTML_QuickForm_textarea($nom_bdd, $label, array('style'=>'white-space: normal;overflow:visible;', 'id' => $nom_bdd, 'wrap' =>'virtual'));
|
365 |
$formtexte= new HTML_QuickForm_textarea($nom_bdd, $label, array('style'=>'white-space: normal;overflow:visible;', 'id' => $nom_bdd, 'wrap' =>'virtual'));
|
366 |
$formtexte->setCols($limite1);
|
366 |
$formtexte->setCols($limite1);
|
367 |
$formtexte->setRows($limite2);
|
367 |
$formtexte->setRows($limite2);
|
368 |
$formtemplate->addElement($formtexte) ;
|
368 |
$formtemplate->addElement($formtexte) ;
|
369 |
//gestion des valeurs par défaut
|
369 |
//gestion des valeurs par défaut
|
370 |
$defauts=array($nom_bdd=>$defaut);
|
370 |
$defauts=array($nom_bdd=>stripslashes($defaut));
|
371 |
$formtemplate->setDefaults($defauts);
|
371 |
$formtemplate->setDefaults($defauts);
|
372 |
$formtemplate->applyFilter($nom_bdd, 'addslashes') ;
|
372 |
$formtemplate->applyFilter($nom_bdd, 'addslashes') ;
|
373 |
//gestion du champs obligatoire
|
373 |
//gestion du champs obligatoire
|
374 |
if (($dans_moteur_de_recherche==0) && isset($obligatoire) && ($obligatoire==1)) {
|
374 |
if (($dans_moteur_de_recherche==0) && isset($obligatoire) && ($obligatoire==1)) {
|
375 |
$formtemplate->addRule($nom_bdd, $label.' obligatoire', 'required', '', 'client') ;
|
375 |
$formtemplate->addRule($nom_bdd, $label.' obligatoire', 'required', '', 'client') ;
|
Line 654... |
Line 654... |
654 |
}
|
654 |
}
|
Line 655... |
Line 655... |
655 |
|
655 |
|
656 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
656 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
657 |
*
|
657 |
*
|
- |
|
658 |
* $Log$
|
- |
|
659 |
* Revision 1.9 2007-10-10 13:59:24 alexandre_tb
|
- |
|
660 |
* ajout de la fonction newsletter
|
- |
|
661 |
* et utilisation du fichier de langue
|
658 |
* $Log$
|
662 |
*
|
659 |
* Revision 1.8 2007-09-18 08:00:42 alexandre_tb
|
663 |
* Revision 1.8 2007-09-18 08:00:42 alexandre_tb
|
660 |
* la valeur par defaut d un lien est http://pour eviter les erreurs
|
664 |
* la valeur par defaut d un lien est http://pour eviter les erreurs
|
661 |
*
|
665 |
*
|
662 |
* Revision 1.7 2007-08-27 12:24:52 alexandre_tb
|
666 |
* Revision 1.7 2007-08-27 12:24:52 alexandre_tb
|