Fix the data-role parameter
This commit is contained in:
parent
44f10ebec2
commit
8511f1f7ef
@ -362,8 +362,12 @@ class FormOther
|
|||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
|
||||||
$out.= ajax_combobox($htmlname);
|
$htmlforcombo = ajax_combobox($htmlname);
|
||||||
$nodatarole=' data-role="none"';
|
if ($htmlforcombo)
|
||||||
|
{
|
||||||
|
$out.= $htmlforcombo;
|
||||||
|
$nodatarole=' data-role="none"';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Select each sales and print them in a select input
|
// Select each sales and print them in a select input
|
||||||
$out.='<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
$out.='<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$nodatarole.'>';
|
||||||
|
|||||||
@ -314,7 +314,7 @@ function ajax_dialog($title,$message,$w=350,$h=150)
|
|||||||
* @param string $htmlname Name of html select field
|
* @param string $htmlname Name of html select field
|
||||||
* @param array $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
* @param array $events More events option. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled')))
|
||||||
* @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete
|
* @param int $minLengthToAutocomplete Minimum length of input string to start autocomplete
|
||||||
* @return string Return html string to convert a select field into a combo
|
* @return string Return html string to convert a select field into a combo, or '' if feature has been disabled for some reason.
|
||||||
*/
|
*/
|
||||||
function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0)
|
function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0)
|
||||||
{
|
{
|
||||||
@ -323,8 +323,8 @@ function ajax_combobox($htmlname, $events=array(), $minLengthToAutocomplete=0)
|
|||||||
if (! empty($conf->browser->phone)) return ''; // combobox disabled for smartphones (does not works)
|
if (! empty($conf->browser->phone)) return ''; // combobox disabled for smartphones (does not works)
|
||||||
if (! empty($conf->dol_use_jmobile)) return ''; // combobox with jmobile (does not works)
|
if (! empty($conf->dol_use_jmobile)) return ''; // combobox with jmobile (does not works)
|
||||||
if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return '';
|
if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return '';
|
||||||
if (empty($conf->use_javascript_ajax)) return '';
|
if (empty($conf->use_javascript_ajax)) return '';
|
||||||
|
|
||||||
/* Some properties for combobox:
|
/* Some properties for combobox:
|
||||||
minLengthToAutocomplete: 2,
|
minLengthToAutocomplete: 2,
|
||||||
comboboxContainerClass: "comboboxContainer",
|
comboboxContainerClass: "comboboxContainer",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user