diff --git a/htdocs/html.formmail.class.php b/htdocs/html.formmail.class.php
index c310600b20d..690dbc94c92 100644
--- a/htdocs/html.formmail.class.php
+++ b/htdocs/html.formmail.class.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2005-2006 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -37,67 +37,69 @@ require_once(DOL_DOCUMENT_ROOT ."/html.form.class.php");
class FormMail
{
- var $db;
-
- var $fromname;
- var $frommail;
- var $replytoname;
- var $replytomail;
- var $toname;
- var $tomail;
-
- var $withfrom;
- var $withto;
- var $withtocc;
- var $withtopic;
- var $withfile;
- var $withbody;
-
- var $withfromreadonly;
- var $withreplytoreadonly;
- var $withtoreadonly;
- var $withtoccreadonly;
- var $withtopicreadonly;
- var $withdeliveryreceipt;
-
- var $substit=array();
- var $param=array();
-
- var $errorstr;
-
- /** \brief Constructeur
- \param DB handler d'accès base de donnée
- */
+ var $db;
- function FormMail($DB)
- {
- $this->db = $DB;
+ var $fromname;
+ var $frommail;
+ var $replytoname;
+ var $replytomail;
+ var $toname;
+ var $tomail;
+
+ var $withfrom;
+ var $withto;
+ var $withtocc;
+ var $withtopic;
+ var $withfile;
+ var $withbody;
+
+ var $withfromreadonly;
+ var $withreplytoreadonly;
+ var $withtoreadonly;
+ var $withtoccreadonly;
+ var $withtopicreadonly;
+ var $withdeliveryreceipt;
+ var $withcancel;
+
+ var $substit=array();
+ var $param=array();
+
+ var $errorstr;
- $this->withfrom=1;
- $this->withto=1;
- $this->withtocc=1;
- $this->withtopic=1;
- $this->withfile=0;
- $this->withbody=1;
-
- $this->withfromreadonly=1;
- $this->withreplytoreadonly=1;
- $this->withtoreadonly=0;
- $this->withtoccreadonly=0;
- $this->withtopicreadonly=0;
- $this->withbodyreadonly=0;
- $this->withdeliveryreceiptreadonly=0;
-
- return 1;
- }
+
+ /**
+ \brief Constructeur
+ \param DB handler d'accès base de donnée
+ */
+ function FormMail($DB)
+ {
+ $this->db = $DB;
+
+ $this->withfrom=1;
+ $this->withto=1;
+ $this->withtocc=1;
+ $this->withtopic=1;
+ $this->withfile=0;
+ $this->withbody=1;
+
+ $this->withfromreadonly=1;
+ $this->withreplytoreadonly=1;
+ $this->withtoreadonly=0;
+ $this->withtoccreadonly=0;
+ $this->withtopicreadonly=0;
+ $this->withbodyreadonly=0;
+ $this->withdeliveryreceiptreadonly=0;
+
+ return 1;
+ }
- /*
- * \brief Effectue les substitutions des mots clés par les données en fonction du tableau $this->substit
- * \param chaine chaine dans laquelle faire les substitutions
- * \return string chaine avec les substitutions effectuées
- */
- function make_substitutions($chaine)
+ /*
+ * \brief Effectue les substitutions des mots clés par les données en fonction du tableau $this->substit
+ * \param chaine chaine dans laquelle faire les substitutions
+ * \return string chaine avec les substitutions effectuées
+ */
+ function make_substitutions($chaine)
{
foreach ($this->substit as $key=>$value) {
$chaine=ereg_replace($key,$value,$chaine);
@@ -106,161 +108,181 @@ class FormMail
}
- /*
- * \brief Affiche la partie de formulaire pour saisie d'un mail en fonction des propriétés
- */
- function show_form() {
- global $conf, $langs, $user;
+ /*
+ * \brief Affiche la partie de formulaire pour saisie d'un mail en fonction des propriétés
+ */
+ function show_form()
+ {
+ global $conf, $langs, $user;
+
+ $langs->load("other");
+ $langs->load("mails");
+
+ $form=new Form($DB);
+
+ print "\n\n";
+ print "\n";
+ print "\n";
+ }
/*