From 9a6cafdf18d60740aa3ea2899b489f2c9b4f8922 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 17 Jun 2011 20:50:57 +0000 Subject: [PATCH] Fix: possibility to hide free "to" --- htdocs/core/class/html.formmail.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 1f505734d4d..90f14fa27ff 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -48,6 +48,7 @@ class FormMail var $withsubstit; // Show substitution array var $withfrom; var $withto; + var $withtofree; var $withtocc; var $withtopic; var $withfile; // 0=No attaches files, 1=Show attached files, 2=Can add new attached files @@ -79,6 +80,7 @@ class FormMail $this->withfrom=1; $this->withto=1; + $this->withtofree=1; $this->withtocc=1; $this->withtoccc=0; $this->witherrorsto=0; @@ -332,7 +334,10 @@ class FormMail } else { - $out.= 'withto) :"").'" />'; + if ($this->withtofree) + { + $out.= 'withto) :"").'" />'; + } if ($this->withtosocid > 0) { $liste=array(); @@ -343,7 +348,7 @@ class FormMail { $liste[$key]=$value; } - $out.= " ".$langs->trans("or")." "; + if ($this->withtofree) $out.= " ".$langs->trans("or")." "; //var_dump($_REQUEST);exit; $out.= $form->selectarray("receiver", $liste, isset($_REQUEST["receiver"])?$_REQUEST["receiver"]:0); }