diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index dd9e643e74c..8c1d0c486b1 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5215,15 +5215,16 @@ class Form
*/
static function selectArrayAjax($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0)
{
- global $langs;
+ global $conf, $langs;
global $delayedhtmlcontent;
- $tmpplugin='select2';
+ // TODO Use an internal dolibarr component instead of select2
+ if (empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) && ! defined('REQUIRE_JQUERY_MULTISELECT')) return '';
$out='';
- // TODO Use an internal dolibarr component instead of select2
- $outdelayed='
+ $tmpplugin='select2';
+ $outdelayed="\n".'
'."\n";
- print ''."\n";
}
}
@@ -1319,7 +1320,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
// Global js function
print ''."\n";
- print ''."\n";
+ print ''."\n";
// Add datepicker default options
/*if (! defined('DISABLE_DATE_PICKER'))
diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php
index 34ec0a80917..b29f8508a8e 100644
--- a/test/phpunit/AdherentTest.php
+++ b/test/phpunit/AdherentTest.php
@@ -196,7 +196,6 @@ class AdherentTest extends PHPUnit_Framework_TestCase
$result=$localobject->fetch($id);
print __METHOD__." id=".$id." result=".$result."\n";
$this->assertLessThan($result, 0);
-
return $localobject;
}
@@ -318,14 +317,13 @@ class AdherentTest extends PHPUnit_Framework_TestCase
$langs=$this->savlangs;
$db=$this->savdb;
- $template = '%DOL_MAIN_URL_ROOT%,%ID%,%CIVILITY%,%FIRSTNAME%,%LASTNAME%,%FULLNAME%,%COMPANY%,'.
- '%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%,%EMAIL%,%BIRTH%,%PHOTO%,%LOGIN%,%PASSWORD%,%PRENOM%,'.
- '%NOM%,%SOCIETE%,%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%';
+ $template = '__CIVILITY__,__FIRSTNAME__,__LASTNAME__,__FULLNAME__,__COMPANY__,'.
+ '__ADDRESS__,__ZIP__,__TOWN__,__COUNTRY__,__EMAIL__,__BIRTH__,__PHOTO__,__LOGIN__';
// If option to store clear password has been set, we get 'dolibspec' into PASSWORD field.
- $expected = DOL_MAIN_URL_ROOT.','.$localobject->id.',,New firstname,New name,New firstname New name,'.
+ $expected = ',New firstname,New name,New firstname New name,'.
'New company,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->birth,'day').',,'.
- 'newlogin,dolibspec,New firstname,New name,New company,New address,New zip,New town,Belgium';
+ 'newlogin';
$result = $localobject->makeSubstitution($template);
print __METHOD__." result=".$result."\n";