Subversion Repositories Applications.bazar

Rev

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

Rev 369 Rev 370
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.php,v 1.74.2.9 2008-02-01 16:23:29 florian Exp $
22
// CVS : $Id: bazar.fonct.php,v 1.74.2.10 2008-02-01 17:20:18 florian Exp $
23
/**
23
/**
24
*
24
*
25
* Fonctions du module bazar
25
* Fonctions du module bazar
26
* 
26
* 
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
*@author        Florian Schmitt <florian@ecole-et-nature.org>
31
*@author        Florian Schmitt <florian@ecole-et-nature.org>
32
//Autres auteurs :
32
//Autres auteurs :
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.74.2.9 $ $Date: 2008-02-01 16:23:29 $
34
*@version       $Revision: 1.74.2.10 $ $Date: 2008-02-01 17:20:18 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 296... Line 296...
296
		$res .= $table->toHTML() ;
296
		$res .= $table->toHTML() ;
297
		}
297
		}
298
	    else {
298
	    else {
299
	    	$res .= '<p class="zone_info">'.BAZ_PAS_DE_FICHE.'</p>'."\n" ;
299
	    	$res .= '<p class="zone_info">'.BAZ_PAS_DE_FICHE.'</p>'."\n" ;
300
	    }
300
	    }
301
	    $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_DEPOSER_ANNONCE);
301
	    $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_SAISIR);
-
 
302
	    $GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
-
 
303
	    $GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
-
 
304
	    $GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION);	
302
		$res .= '<br /><ul id="liste_liens"><li id="lien_saisir"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" title="'.BAZ_SAISIR_UNE_NOUVELLE_FICHE.'">'.BAZ_SAISIR_UNE_NOUVELLE_FICHE.'</a></li></ul>';
305
		$res .= '<br /><ul id="liste_liens"><li id="lien_saisir"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" title="'.BAZ_SAISIR_UNE_NOUVELLE_FICHE.'">'.BAZ_SAISIR_UNE_NOUVELLE_FICHE.'</a></li></ul>';
303
		$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION);	    
-
 
-
 
306
		    
304
	}
307
	}
305
	else  { 
308
	else  { 
Line 306... Line 309...
306
	
309
	
307
	include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
310
	include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php';
Line 605... Line 608...
605
						}
608
						}
606
						$formtemplate->addElement('radio', 'typeannonce', '', 
609
						$formtemplate->addElement('radio', 'typeannonce', '', 
607
								$titre.$ligne['bn_description'].'<br /><br />'."\n", 
610
								$titre.$ligne['bn_description'].'<br /><br />'."\n", 
608
								$ligne['bn_id_nature'], array("id" => 'select'.$ligne['bn_id_nature'], 
611
								$ligne['bn_id_nature'], array("id" => 'select'.$ligne['bn_id_nature'], 
609
								"style" => 'float:left;'));
612
								"style" => 'float:left;'));
-
 
613
						$formtemplate->addRule('typeannonce', 'Il faut choisir un type de fiche', 'required', '', 'client') ;
610
					}		
614
					}		
611
				}
615
				}
612
				$squelette->setElementTemplate( '<div class="listechoix">'."\n".'{element}'."\n".'</div>'."\n");
616
				$squelette->setElementTemplate( '<div class="listechoix">'."\n".'{element}'."\n".'</div>'."\n");
613
			
617
											
614
				//Mettre les annonces en choix par defaut
-
 
615
				$formtemplate->setdefaults(array('typeannonce'=>'1'));
-
 
616
				
-
 
617
				// Bouton d annulation
-
 
618
				$lien_formulaire->removeQueryString(BAZ_VARIABLE_ACTION);
-
 
619
				$buttons[] = &HTML_QuickForm::createElement('link', 'annuler', BAZ_ANNULER, 
-
 
620
                            preg_replace ("/&amp;/", "&", $lien_formulaire->getURL()), BAZ_ANNULER); // Le preg_replace contourne un pb de QuickForm et Net_URL
-
 
621
                                                                                                            // qui remplacent deux fois les & par des &amp;
-
 
622
				//Bouton de validation du formulaire                                                                                                            // ce qui fait échouer le lien
618
				//Bouton de validation du formulaire                                                                                                            // ce qui fait échouer le lien
623
        		$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', BAZ_VALIDER);
619
        		$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', BAZ_VALIDER);
624
        		$formtemplate->addGroup($buttons, null, null, '&nbsp;');
620
        		$formtemplate->addGroup($buttons, null, null, '&nbsp;');
Line 625... Line 621...
625
			
621
			
Line 1333... Line 1329...
1333
}
1329
}
Line 1334... Line 1330...
1334
 
1330
 
1335
/* +--Fin du code ----------------------------------------------------------------------------------------+
1331
/* +--Fin du code ----------------------------------------------------------------------------------------+
1336
*
1332
*
-
 
1333
* $Log: not supported by cvs2svn $
-
 
1334
* Revision 1.74.2.9  2008-02-01 16:23:29  florian
-
 
1335
* ajout champs_mail, décommenter les traductions des javascripts
1337
* $Log: not supported by cvs2svn $
1336
*
1338
* Revision 1.74.2.8  2008-02-01 09:56:56  alexandre_tb
1337
* Revision 1.74.2.8  2008-02-01 09:56:56  alexandre_tb
1339
* reglage du pb de double saisie de fiche,
1338
* reglage du pb de double saisie de fiche,
1340
* ajout d un exit apres le header location
1339
* ajout d un exit apres le header location
1341
*
1340
*