Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 706 → Rev 707

/trunk/client/contact/contact.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: contact.php,v 1.1 2005-09-22 13:28:50 florian Exp $
// CVS : $Id: contact.php,v 1.2 2006-01-19 10:24:37 florian Exp $
/**
* Contact
*
30,7 → 30,7
*@author Florian SCHMITT <florian@ecole-et-nature.org>
*
*@copyright Réseau Ecole et Nature 2005
*@version $Revision: 1.1 $ $Date: 2005-09-22 13:28:50 $
*@version $Revision: 1.2 $ $Date: 2006-01-19 10:24:37 $
// +------------------------------------------------------------------------------------------------------+
*/
 
78,9 → 78,15
$form_contact = new HTML_QuickForm('inscription', 'post', $url);
$squelette =& $form_contact->defaultRenderer();
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
$squelette->setElementTemplate( '<label>{label}&nbsp;</label><br />'."\n".'{element}<br />'."\n");
$option=array('style'=>'width:500px;', 'maxlength'=>100, 'value'=>CON_ENTREZ_VOTRE_MAIL);
$squelette->setElementTemplate( '<label>{label}&nbsp;</label><br />'."\n".'{element}'."\n".
'<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required -->'."\n".'<br />'."\n");
$squelette->setRequiredNoteTemplate("\n".'<span class="symbole_obligatoire">* {requiredNote}</span>'."\n");
$option=array('style'=>'width:500px;', 'maxlength'=>100);
$form_contact->setRequiredNote(CON_CHAMPS_REQUIS) ;
$form_contact->setJsWarnings(CON_ERREUR_SAISIE,CON_VEUILLEZ_CORRIGER);
$form_contact->addElement('text', 'Expediteur', CON_EXPEDITEUR, $option);
$form_contact->addRule('Expediteur', CON_EMAIL_REQUIS, 'required','', 'client') ;
$form_contact->addRule('Expediteur', CON_EMAIL_INCORRECT, 'email', '', 'client') ;
$liste_destinataires[0]='service d\'information générale';
$liste_destinataires[1]='relations nationales';
$liste_destinataires[2]='relations internationales';
92,12 → 98,14
$liste_destinataires[8]='service informatique / hébergement Internet';
$option=array('style'=>'width:500px;');
$form_contact->addElement('select', 'Destinataire', CON_DESTINATAIRE, $liste_destinataires, $option);
$option=array('style'=>'width:500px;','maxlength'=>100, 'value'=>CON_ENTREZ_VOTRE_SUJET);
$form_contact->addElement('text', 'Subject', CON_SUJET, $option);
$option=array('style'=>'width:500px;','maxlength'=>100);
$form_contact->addElement('text', 'Subject', CON_SUJET, $option);
$form_contact->addRule('Subject', CON_SUJET_REQUIS, 'required','', 'client') ;
$option=array('style'=>'width:500px;height:200px;white-space: pre;padding:3px;');
require_once 'HTML/QuickForm/textarea.php';
$formtexte= new HTML_QuickForm_textarea('Text', CON_MESSAGE, $option);
$form_contact->addElement($formtexte) ;
$form_contact->addRule('Text', CON_MESSAGE_REQUIS, 'required','', 'client') ;
$form_contact->addElement('submit', 'Envoyer', CON_ENVOYER);
$res .= $form_contact->toHTML();
return $res ;
105,9 → 113,12
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* $Log: not supported by cvs2svn $
* Revision 1.1 2005/09/22 13:28:50 florian
* Application de contact, pour envoyer des mails. Reste a faire: configuration pour choisir les destinataires dans l'annuaire.
*
*
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>