Subversion Repositories Applications.bazar

Rev

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

Rev 358 Rev 381
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.rss.php,v 1.104 2007-12-14 15:58:39 alexandre_tb Exp $
22
// CVS : $Id: bazar.fonct.rss.php,v 1.105 2008-03-17 11:02:59 jp_milcent Exp $
23
/**
23
/**
24
* 
24
* 
25
*@package bazar
25
*@package bazar
26
//Auteur original :
26
//Auteur original :
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
27
*@author        Alexandre GRANIER <alexandre@tela-botanica.org>
28
*@author        Florian Schmitt <florian@ecole-et-nature.org>
28
*@author        Florian Schmitt <florian@ecole-et-nature.org>
29
//Autres auteurs :
29
//Autres auteurs :
30
*@copyright     Tela-Botanica 2000-2006
30
*@copyright     Tela-Botanica 2000-2006
31
*@version       $Revision: 1.104 $
31
*@version       $Revision: 1.105 $
32
// +------------------------------------------------------------------------------------------------------+
32
// +------------------------------------------------------------------------------------------------------+
33
*/
33
*/
Line 34... Line 34...
34
 
34
 
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
Line 481... Line 481...
481
				}
481
				}
482
			}
482
			}
483
			else $res .= BAZ_PAS_DE_COMMENTAIRES.'<br /><br />'."\n";
483
			else $res .= BAZ_PAS_DE_COMMENTAIRES.'<br /><br />'."\n";
Line 484... Line 484...
484
			
484
			
-
 
485
			//formulaire des commentaires
485
			//formulaire des commentaires
486
			if ($GLOBALS['AUTH']->getAuth()) {
486
			$form_commentaire = new HTML_QuickForm('bazar_commentaire', 'post', $url);
487
				$form_commentaire = new HTML_QuickForm('bazar_commentaire', 'post', $url);
487
			$squelette =& $form_commentaire->defaultRenderer();
488
				$squelette =& $form_commentaire->defaultRenderer();
488
			$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
489
				$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
489
			$squelette->setElementTemplate( '<label style="width:200px;">{label}'.
490
				$squelette->setElementTemplate( '<label style="width:200px;">{label}'.
490
											'<!-- BEGIN required --><span class="symbole_obligatoire">&nbsp;*</span><!-- END required -->'."\n".
491
												'<!-- BEGIN required --><span class="symbole_obligatoire">&nbsp;*</span><!-- END required -->'."\n".
491
										    '</label><br />'."\n".'{element}<br />'."\n");
492
											    '</label><br />'."\n".'{element}<br />'."\n");
492
			$squelette->setRequiredNoteTemplate("\n".'<span class="symbole_obligatoire"> *{requiredNote}</span>'."\n");
493
				$squelette->setRequiredNoteTemplate("\n".'<span class="symbole_obligatoire"> *{requiredNote}</span>'."\n");
493
			$option=array('style'=>'width:300px;border:1px solid #000;', 'maxlength'=>100);
494
				$option=array('style'=>'width:300px;border:1px solid #000;', 'maxlength'=>100);
494
			$form_commentaire->addElement('text', 'Nom', BAZ_ENTREZ_VOTRE_NOM, $option);
495
				$form_commentaire->addElement('text', 'Nom', BAZ_ENTREZ_VOTRE_NOM, $option);
495
			$option=array('style'=>'width:95%;height:100px;white-space: pre;padding:3px;border:1px solid #000;');
496
				$option=array('style'=>'width:95%;height:100px;white-space: pre;padding:3px;border:1px solid #000;');
496
			require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/textarea.php';
497
				require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/textarea.php';
497
			$formtexte= new HTML_QuickForm_textarea('Commentaire', BAZ_ENTREZ_VOTRE_COMMENTAIRE, $option);
498
				$formtexte= new HTML_QuickForm_textarea('Commentaire', BAZ_ENTREZ_VOTRE_COMMENTAIRE, $option);
498
			$form_commentaire->addElement($formtexte) ;
499
				$form_commentaire->addElement($formtexte) ;
499
			$option=array('style'=>'border:1px solid #000;');
500
				$option=array('style'=>'border:1px solid #000;');
500
			$form_commentaire->addElement('submit', 'Envoyer', BAZ_ENVOYER, $option);
501
				$form_commentaire->addElement('submit', 'Envoyer', BAZ_ENVOYER, $option);
501
			$form_commentaire->addRule('Nom', BAZ_NOM_REQUIS, 'required', '', 'client') ;
502
				$form_commentaire->addRule('Nom', BAZ_NOM_REQUIS, 'required', '', 'client') ;
502
			$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ;
503
				$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ;
503
			$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
504
				$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ;
-
 
505
				$res .= $form_commentaire->toHTML();
504
			$res .= $form_commentaire->toHTML();
506
			}
505
			$res .= '</div>'."\n";
507
			$res .= '</div>'."\n";
506
		}
508
		}
Line 507... Line 509...
507
	}
509
	}
508
	
510
	
509
	// Nettoyage de l'url
511
	// Nettoyage de l'url avant les return : apparement inutile sinon pose pb dans Papyrus (url applette deconnexion et moteur de recherche) [jpm le 17 mars 2008]
510
	$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
512
	//$GLOBALS['_BAZAR_']['url']->removeQueryString('action');
511
	$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
513
	//$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche');
512
	$GLOBALS['_BAZAR_']['url']->removeQueryString('id_commentaire');
514
	$GLOBALS['_BAZAR_']['url']->removeQueryString('id_commentaire');
513
	$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
515
	$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce');
Line 1245... Line 1247...
1245
}
1247
}
Line 1246... Line 1248...
1246
 
1248
 
1247
/* +--Fin du code ----------------------------------------------------------------------------------------+
1249
/* +--Fin du code ----------------------------------------------------------------------------------------+
1248
*
1250
*
-
 
1251
* $Log: not supported by cvs2svn $
-
 
1252
* Revision 1.104  2007-12-14 15:58:39  alexandre_tb
-
 
1253
* Fusion avec la livraison AHA : 14 decembre 2007
1249
* $Log: not supported by cvs2svn $
1254
*
1250
* Revision 1.103  2007-12-10 12:59:34  jp_milcent
1255
* Revision 1.103  2007-12-10 12:59:34  jp_milcent
1251
* Fusion avec la livraison AHA : 10 décembre 2007
1256
* Fusion avec la livraison AHA : 10 décembre 2007
1252
*
1257
*
1253
* Revision 1.99.2.5  2007-12-10 12:57:34  jp_milcent
1258
* Revision 1.99.2.5  2007-12-10 12:57:34  jp_milcent