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.17 2006-01-30 10:27:03 florian Exp $
|
22 |
// CVS : $Id: bazar.fonct.formulaire.php,v 1.18 2006-03-01 16:01:46 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.17 $ $Date: 2006-01-30 10:27:03 $
|
34 |
*@version $Revision: 1.18 $ $Date: 2006-03-01 16:01:46 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
Line 217... |
Line 217... |
217 |
* @param string table source pour les valeurs du texte (inutile)
|
217 |
* @param string table source pour les valeurs du texte (inutile)
|
218 |
* @param string ce champs est il obligatoire? (required)
|
218 |
* @param string ce champs est il obligatoire? (required)
|
219 |
* @return void
|
219 |
* @return void
|
220 |
*/
|
220 |
*/
|
221 |
function url(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire) {
|
221 |
function url(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire) {
|
222 |
$html.='<tr>'."\n".'<td colspan="2">'."\n".'<h4>'.$label.'</h4>'."\n".'</td>'."\n".'</tr>'."\n";
|
222 |
$html ='<tr>'."\n".'<td colspan="2">'."\n".'<h4>'.$label.'</h4>'."\n".'</td>'."\n".'</tr>'."\n";
|
223 |
$formtemplate->addElement('html', $html) ;
|
223 |
$formtemplate->addElement('html', $html) ;
|
224 |
$formtemplate->addElement('text', 'url_lien'.$nom_bdd, BAZ_URL_LIEN) ;
|
224 |
$formtemplate->addElement('text', 'url_lien'.$nom_bdd, BAZ_URL_LIEN) ;
|
225 |
$formtemplate->addElement('text', 'url_texte'.$nom_bdd, BAZ_URL_TEXTE) ;
|
225 |
$formtemplate->addElement('text', 'url_texte'.$nom_bdd, BAZ_URL_TEXTE) ;
|
226 |
//gestion du champs obligatoire
|
226 |
//gestion du champs obligatoire
|
227 |
if (isset($obligatoire)and($obligatoire==1)) {
|
227 |
if (isset($obligatoire)and($obligatoire==1)) {
|
Line 241... |
Line 241... |
241 |
* @param string table source pour les valeurs du texte (inutile)
|
241 |
* @param string table source pour les valeurs du texte (inutile)
|
242 |
* @param string ce champs est il obligatoire? (required)
|
242 |
* @param string ce champs est il obligatoire? (required)
|
243 |
* @return void
|
243 |
* @return void
|
244 |
*/
|
244 |
*/
|
245 |
function fichier(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire) {
|
245 |
function fichier(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire) {
|
246 |
$html.='<tr>'."\n".'<td colspan="2">'."\n".'<h4>'.$label.'</h4>'."\n".'</td>'."\n".'</tr>'."\n";
|
246 |
$html ='<tr>'."\n".'<td colspan="2">'."\n".'<h4>'.$label.'</h4>'."\n".'</td>'."\n".'</tr>'."\n";
|
247 |
$formtemplate->addElement('html', $html) ;
|
247 |
$formtemplate->addElement('html', $html) ;
|
248 |
$formtemplate->addElement('text', 'texte_fichier'.$nom_bdd, BAZ_FICHIER_DESCRIPTION) ;
|
248 |
$formtemplate->addElement('text', 'texte_fichier'.$nom_bdd, BAZ_FICHIER_DESCRIPTION) ;
|
249 |
$formtemplate->addElement('file', 'fichier'.$nom_bdd, BAZ_FICHIER_JOINT) ;
|
249 |
$formtemplate->addElement('file', 'fichier'.$nom_bdd, BAZ_FICHIER_JOINT) ;
|
250 |
$formtemplate->addRule('image', BAZ_IMAGE_VALIDE_REQUIS, '', '', 'client') ; //a completer pour checker l'image
|
250 |
$formtemplate->addRule('image', BAZ_IMAGE_VALIDE_REQUIS, '', '', 'client') ; //a completer pour checker l'image
|
251 |
$formtemplate->setMaxFileSize($limite1);
|
251 |
$formtemplate->setMaxFileSize($limite1);
|
Line 301... |
Line 301... |
301 |
}
|
301 |
}
|
Line 302... |
Line 302... |
302 |
|
302 |
|
303 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
303 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
304 |
*
|
304 |
*
|
- |
|
305 |
* $Log: not supported by cvs2svn $
|
- |
|
306 |
* Revision 1.17 2006/01/30 10:27:03 florian
|
- |
|
307 |
* - ajout des entrées de formulaire fichier, url, et image
|
- |
|
308 |
* - correction bug d'affichage du mode de saisie
|
305 |
* $Log: not supported by cvs2svn $
|
309 |
*
|
306 |
* Revision 1.16 2006/01/24 14:11:44 alexandre_tb
|
310 |
* Revision 1.16 2006/01/24 14:11:44 alexandre_tb
|
307 |
* ajout du paramètre emptyOptionValue dans les champs de date
|
311 |
* ajout du paramètre emptyOptionValue dans les champs de date
|
308 |
*
|
312 |
*
|
309 |
* Revision 1.15 2006/01/23 16:57:03 alexandre_tb
|
313 |
* Revision 1.15 2006/01/23 16:57:03 alexandre_tb
|