diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index a787e39bcc7..75755594274 100755 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -321,7 +321,7 @@ else $formsms->withtopic=(isset($_POST['subject'])?$_POST['subject']:$langs->trans("Test")); $formsms->withtopicreadonly=0; $formsms->withfile=2; - $formsms->withbody=(isset($_POST['message'])?$_POST['message']:$langs->trans("PredefinedMailTest")); + $formsms->withbody=(isset($_POST['message'])?$_POST['message']:$langs->trans("ThisIsATestMessage")); $formsms->withbodyreadonly=0; $formsms->withcancel=1; $formsms->withfckeditor=0; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 9255e245d3e..16a8a38653a 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -192,7 +192,7 @@ class Conf { $module=strtolower($reg[1]); // Add this module in list of modules that need smarty - $this->sms_engine[]=$module; + $this->sms_engine[$module]=$module; } // If this is a module constant elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)$/i',$key,$reg)) diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index f5ea6025118..be5807fda9e 100755 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -84,8 +84,7 @@ class FormSms } /** - * Show the form to input an email - * this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files + * Show the form to input an sms */ function show_form() { @@ -96,8 +95,27 @@ class FormSms $langs->load("sms"); $form=new Form($DB); + $soc=new Societe($this->db); + if ($this->withtosocid > 0) + { + $soc->fetch($this->withtosocid); + } + + print "\n\n"; + + print ' +'; - print "\n\n"; print "