>From 0cb805fcfac05970e194521f5951403ec4d9a9eb Mon Sep 17 00:00:00 2001 From: jfefe Date: Mon, 17 Oct 2011 01:51:12 +0200 Subject: [PATCH 4/4] Nice error message Add input socid into sms form --- htdocs/admin/sms.php | 4 ++-- htdocs/core/class/html.formsms.class.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index 342289a..f0390a3 100755 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -152,8 +152,8 @@ print_fiche_titre($langs->trans("SmsSetup"),'','setup'); print $langs->trans("SmsDesc")."
\n"; print "
\n"; -if ($message) print $message.'
'; - +if ($message) + dol_htmloutput_mesg($message); // List of sending methods $listofmethods=(is_array($conf->sms_engine)?$conf->sms_engine:array()); asort($listofmethods); diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index f0d5a54..ee4f772 100755 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -53,6 +53,8 @@ class FormSms var $withtoreadonly; var $withtopicreadonly; var $withcancel; + + var $socidsms; var $substit=array(); var $param=array(); @@ -78,6 +80,8 @@ class FormSms $this->withtoreadonly=0; $this->withtopicreadonly=0; $this->withbodyreadonly=0; + + $this->withsocidreadonly=1; return 1; } @@ -214,12 +218,18 @@ function limitChars(textarea, limit, infodiv) if ($this->withto || is_array($this->withto)) { print ''; + + if ($this->withsocidreadonly) + { + print ''; + } //$moretext=$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"); $moretext=''; print $form->textwithpicto($langs->trans("SmsTo"),$moretext); print ''; if ($this->withtoreadonly) { + print (! is_array($this->withto) && ! is_numeric($this->withto))?$this->withto:""; } else -- 1.7.2.5