Subversion Repositories Applications.papyrus

Rev

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

Rev 445 Rev 707
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: contact.php,v 1.1 2005-09-22 13:28:50 florian Exp $
22
// CVS : $Id: contact.php,v 1.2 2006-01-19 10:24:37 florian Exp $
23
/**
23
/**
24
* Contact
24
* Contact
25
*
25
*
26
* Un module d'envoi de mails a une personne de l'annuaire, choisie par une liste déroulante
26
* Un module d'envoi de mails a une personne de l'annuaire, choisie par une liste déroulante
27
*
27
*
28
*@package inscription
28
*@package inscription
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
*
31
*
32
*@copyright     Réseau Ecole et Nature 2005
32
*@copyright     Réseau Ecole et Nature 2005
33
*@version       $Revision: 1.1 $ $Date: 2005-09-22 13:28:50 $
33
*@version       $Revision: 1.2 $ $Date: 2006-01-19 10:24:37 $
34
// +------------------------------------------------------------------------------------------------------+
34
// +------------------------------------------------------------------------------------------------------+
35
*/
35
*/
Line 36... Line 36...
36
 
36
 
37
// +------------------------------------------------------------------------------------------------------+
37
// +------------------------------------------------------------------------------------------------------+
Line 76... Line 76...
76
	$res .= '<br /><br />'."\n";
76
	$res .= '<br /><br />'."\n";
77
	$res .= '<h3>'.CON_ENVOYER_NOUS_MAIL.'</h3>'."\n";
77
	$res .= '<h3>'.CON_ENVOYER_NOUS_MAIL.'</h3>'."\n";
78
	$form_contact = new HTML_QuickForm('inscription', 'post', $url);
78
	$form_contact = new HTML_QuickForm('inscription', 'post', $url);
79
	$squelette =& $form_contact->defaultRenderer();
79
	$squelette =& $form_contact->defaultRenderer();
80
	$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
80
	$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n");
81
	$squelette->setElementTemplate( '<label>{label}&nbsp;</label><br />'."\n".'{element}<br />'."\n");
81
	$squelette->setElementTemplate( '<label>{label}&nbsp;</label><br />'."\n".'{element}'."\n".
-
 
82
	 '<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required -->'."\n".'<br />'."\n");
-
 
83
	$squelette->setRequiredNoteTemplate("\n".'<span class="symbole_obligatoire">* {requiredNote}</span>'."\n");
82
	$option=array('style'=>'width:500px;', 'maxlength'=>100, 'value'=>CON_ENTREZ_VOTRE_MAIL);
84
	$option=array('style'=>'width:500px;', 'maxlength'=>100);
-
 
85
	$form_contact->setRequiredNote(CON_CHAMPS_REQUIS) ;
-
 
86
	$form_contact->setJsWarnings(CON_ERREUR_SAISIE,CON_VEUILLEZ_CORRIGER);
83
	$form_contact->addElement('text', 'Expediteur', CON_EXPEDITEUR, $option);
87
	$form_contact->addElement('text', 'Expediteur', CON_EXPEDITEUR, $option);
-
 
88
	$form_contact->addRule('Expediteur', CON_EMAIL_REQUIS, 'required','', 'client') ;
-
 
89
    $form_contact->addRule('Expediteur', CON_EMAIL_INCORRECT, 'email', '', 'client') ;
84
	$liste_destinataires[0]='service d\'information générale';
90
	$liste_destinataires[0]='service d\'information générale';
85
	$liste_destinataires[1]='relations nationales';
91
	$liste_destinataires[1]='relations nationales';
86
	$liste_destinataires[2]='relations internationales';
92
	$liste_destinataires[2]='relations internationales';
87
	$liste_destinataires[3]='formations et professionnalisation';
93
	$liste_destinataires[3]='formations et professionnalisation';
88
	$liste_destinataires[4]='dispositifs pédagogiques';
94
	$liste_destinataires[4]='dispositifs pédagogiques';
Line 90... Line 96...
90
	$liste_destinataires[6]='communication / édition';
96
	$liste_destinataires[6]='communication / édition';
91
	$liste_destinataires[7]='service de comptabilité';
97
	$liste_destinataires[7]='service de comptabilité';
92
	$liste_destinataires[8]='service informatique / hébergement Internet';
98
	$liste_destinataires[8]='service informatique / hébergement Internet';
93
	$option=array('style'=>'width:500px;');
99
	$option=array('style'=>'width:500px;');
94
	$form_contact->addElement('select', 'Destinataire', CON_DESTINATAIRE, $liste_destinataires, $option);
100
	$form_contact->addElement('select', 'Destinataire', CON_DESTINATAIRE, $liste_destinataires, $option);
95
	$option=array('style'=>'width:500px;','maxlength'=>100, 'value'=>CON_ENTREZ_VOTRE_SUJET);
101
	$option=array('style'=>'width:500px;','maxlength'=>100);
96
    	$form_contact->addElement('text', 'Subject', CON_SUJET, $option);
102
    $form_contact->addElement('text', 'Subject', CON_SUJET, $option);
-
 
103
    $form_contact->addRule('Subject', CON_SUJET_REQUIS, 'required','', 'client') ;
97
	$option=array('style'=>'width:500px;height:200px;white-space: pre;padding:3px;');
104
	$option=array('style'=>'width:500px;height:200px;white-space: pre;padding:3px;');
98
	require_once 'HTML/QuickForm/textarea.php';
105
	require_once 'HTML/QuickForm/textarea.php';
99
	$formtexte= new HTML_QuickForm_textarea('Text', CON_MESSAGE, $option);
106
	$formtexte= new HTML_QuickForm_textarea('Text', CON_MESSAGE, $option);
100
	$form_contact->addElement($formtexte) ;
107
	$form_contact->addElement($formtexte) ;
-
 
108
	$form_contact->addRule('Text', CON_MESSAGE_REQUIS, 'required','', 'client') ;
101
	$form_contact->addElement('submit', 'Envoyer', CON_ENVOYER);
109
	$form_contact->addElement('submit', 'Envoyer', CON_ENVOYER);
102
	$res .= $form_contact->toHTML();
110
	$res .= $form_contact->toHTML();
103
	return $res ;
111
	return $res ;
104
}
112
}
Line 105... Line 113...
105
 
113
 
106
/* +--Fin du code ----------------------------------------------------------------------------------------+
114
/* +--Fin du code ----------------------------------------------------------------------------------------+
107
*
115
*
-
 
116
* $Log: not supported by cvs2svn $
-
 
117
* Revision 1.1  2005/09/22 13:28:50  florian
-
 
118
* Application de contact, pour envoyer des mails. Reste a faire: configuration pour choisir les destinataires dans l'annuaire.
108
* $Log: not supported by cvs2svn $
119
*
109
*
120
*
110
*
121
*
111
* +-- Fin du code ----------------------------------------------------------------------------------------+
122
* +-- Fin du code ----------------------------------------------------------------------------------------+
112
*/
123
*/