Subversion Repositories Applications.bazar

Rev

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

Rev 80 Rev 82
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.15 2006-01-23 16:57:03 alexandre_tb Exp $
22
// CVS : $Id: bazar.fonct.formulaire.php,v 1.16 2006-01-24 14:11:44 alexandre_tb 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.15 $ $Date: 2006-01-23 16:57:03 $
34
*@version       $Revision: 1.16 $ $Date: 2006-01-24 14:11:44 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 122... Line 122...
122
* @param    string  table source pour les valeurs de la date
122
* @param    string  table source pour les valeurs de la date
123
* @param    string  ce champs est il obligatoire? (required)
123
* @param    string  ce champs est il obligatoire? (required)
124
* @return   void
124
* @return   void
125
*/
125
*/
126
function listedatedeb(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire) {
126
function listedatedeb(&$formtemplate, $nom_bdd , $label, $limite1, $limite2, $defaut, $source, $obligatoire) {
127
	$optiondate=array('language' => BAZ_LANGUE_PAR_DEFAUT,'minYear' => date('Y'),'maxYear'=> (date('Y')+10), 'format' => 'd m Y');
127
	$optiondate = array('language' => BAZ_LANGUE_PAR_DEFAUT,
-
 
128
						'minYear' => date('Y'),
-
 
129
						'maxYear'=> (date('Y')+10),
-
 
130
						'format' => 'd m Y',
-
 
131
						'addEmptyOption' => true,
-
 
132
						);
128
	$formtemplate->addElement('date', $nom_bdd, constant($label), $optiondate) ;
133
	$formtemplate->addElement('date', $nom_bdd, constant($label), $optiondate) ;
129
	//gestion des valeurs par défaut (date du jour)	
134
	//gestion des valeurs par défaut (date du jour)	
130
	if (isset($defaut)) $formtemplate->setDefaults(array($nom_bdd => $defaut));
135
	if (isset($defaut)) $formtemplate->setDefaults(array($nom_bdd => $defaut));
131
	else {
136
	else {
132
		$defauts=array($nom_bdd => array ('d'=>date('d'), 'm'=>date('m'), 'Y'=>date('Y')));
137
		$defauts=array($nom_bdd => array ('d'=>date('d'), 'm'=>date('m'), 'Y'=>date('Y')));
Line 222... Line 227...
222
}
227
}
Line 223... Line 228...
223
 
228
 
224
/* +--Fin du code ----------------------------------------------------------------------------------------+
229
/* +--Fin du code ----------------------------------------------------------------------------------------+
225
*
230
*
-
 
231
* $Log: not supported by cvs2svn $
-
 
232
* Revision 1.15  2006/01/23 16:57:03  alexandre_tb
-
 
233
* correction d'un notice
226
* $Log: not supported by cvs2svn $
234
*
227
* Revision 1.14  2006/01/19 17:42:11  florian
235
* Revision 1.14  2006/01/19 17:42:11  florian
228
* ajout des cases à cocher pré-cochées pour les maj
236
* ajout des cases à cocher pré-cochées pour les maj
229
*
237
*
230
* Revision 1.13  2006/01/13 14:12:51  florian
238
* Revision 1.13  2006/01/13 14:12:51  florian