Subversion Repositories Applications.bazar

Rev

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

Rev 47 Rev 53
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.7 2005-11-07 17:51:06 florian Exp $
22
// CVS : $Id: bazar.fonct.formulaire.php,v 1.8 2005-11-18 16:03:23 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.7 $ $Date: 2005-11-07 17:51:06 $
34
*@version       $Revision: 1.8 $ $Date: 2005-11-18 16:03:23 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 59... Line 59...
59
	}
59
	}
60
	while ($ligne = $resultat->fetchRow()) {
60
	while ($ligne = $resultat->fetchRow()) {
61
		$select[$ligne[0]] = $ligne[1] ;
61
		$select[$ligne[0]] = $ligne[1] ;
62
	}
62
	}
63
	$option=array('style'=>'width: '.$limite1.'px;');
63
	$option=array('style'=>'width: '.$limite1.'px;');
64
	require_once 'HTML/QuickForm/select.php';
64
	require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm/select.php';
65
	$select= new HTML_QuickForm_select($nom_bdd, constant($label), $select, $option);
65
	$select= new HTML_QuickForm_select($nom_bdd, constant($label), $select, $option);
66
	$select->setSize($limite2); 
66
	$select->setSize($limite2); 
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 178... Line 178...
178
* @param    string  table source pour les valeurs du texte (pas utilisé)
178
* @param    string  table source pour les valeurs du texte (pas utilisé)
179
* @param    string  ce champs est il obligatoire? (required) (pas utilisé)
179
* @param    string  ce champs est il obligatoire? (required) (pas utilisé)
180
* @return   void
180
* @return   void
181
*/
181
*/
182
function labelhtml(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire) {
182
function labelhtml(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire) {
183
	require_once 'HTML/QuickForm/html.php';
183
	require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm/html.php';
184
	$formhtml= new HTML_QuickForm_html(constant($label));
184
	$formhtml= new HTML_QuickForm_html(constant($label));
185
	$formtemplate->addElement($formhtml) ;
185
	$formtemplate->addElement($formhtml) ;
186
}
186
}
Line 187... Line 187...
187
 
187
 
188
/* +--Fin du code ----------------------------------------------------------------------------------------+
188
/* +--Fin du code ----------------------------------------------------------------------------------------+
189
*
189
*
-
 
190
* $Log: not supported by cvs2svn $
-
 
191
* Revision 1.7  2005/11/07 17:51:06  florian
-
 
192
* correction bug liste
190
* $Log: not supported by cvs2svn $
193
*
191
* Revision 1.6  2005/11/07 17:30:36  florian
194
* Revision 1.6  2005/11/07 17:30:36  florian
192
* ajout controle sur les listes pour la saisie
195
* ajout controle sur les listes pour la saisie
193
*
196
*
194
* Revision 1.5  2005/11/07 17:05:45  florian
197
* Revision 1.5  2005/11/07 17:05:45  florian