diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php
index dd4845111e1..83e757b78f8 100644
--- a/htdocs/public/onlinesign/newonlinesign.php
+++ b/htdocs/public/onlinesign/newonlinesign.php
@@ -15,9 +15,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
- *
- * For paypal test: https://developer.paypal.com/
- * For paybox test: ???
*/
/**
@@ -26,8 +23,9 @@
* \brief File to offer a way to make an online signature for a particular Dolibarr entity
*/
-define("NOLOGIN", 1); // This means this output page does not require to be logged.
-define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
+if (!defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged.
+if (!defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
+if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
// For MultiCompany module.
// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
@@ -41,12 +39,13 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
+// Load translation files
+$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox"));
+
// Security check
// No check on module enabled. Done later according to $validpaymentmethod
-$langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "paybox"));
-
-$action = GETPOST('action', 'alpha');
+$action = GETPOST('action', 'aZ09');
// Input are:
// type ('invoice','order','contractline'),
@@ -55,7 +54,7 @@ $action = GETPOST('action', 'alpha');
// tag (a free text, required if type is empty)
// currency (iso code)
-$suffix = GETPOST("suffix", 'alpha');
+$suffix = GETPOST("suffix", 'aZ09');
$source = GETPOST("source", 'alpha');
$ref = $REF = GETPOST("ref", 'alpha');
@@ -71,9 +70,6 @@ if (!$action)
}
-$paymentmethod = '';
-$validpaymentmethod = array();
-
@@ -133,7 +129,8 @@ if (!empty($conf->global->MAIN_SIGN_CSS_URL)) $head = 'dol_hide_topmenu = 1;
$conf->dol_hide_leftmenu = 1;
-llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody');
+$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '