diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b07e5220384..32abc8f7240 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -665,16 +665,18 @@ class Form * @param string $selected Value auto selected when at least one record is selected. Not a preselected value. Use '0' by default. * @param array $arrayofaction array('code'=>'label', ...). The code is the key stored into the GETPOST('massaction') when submitting action. * @param int $alwaysvisible 1=select button always visible + * @param string $name Name for massaction + * @param string $cssclass CSS class used to check for select * @return string|void Select list */ - public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0) + public function selectMassAction($selected, $arrayofaction, $alwaysvisible = 0, $name = 'massaction', $cssclass = 'checkforselect') { global $conf, $langs, $hookmanager; $disabled = 0; $ret = '
'; - $ret .= ''; // Complete list with data from external modules. THe module can use $_SERVER['PHP_SELF'] to know on which page we are, or use the $parameters['currentcontext'] completed by executeHooks. $parameters = array(); @@ -693,46 +695,46 @@ class Form $ret .= ''; - if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.massactionselect'); + if (empty($conf->dol_optimize_smallscreen)) $ret .= ajax_combobox('.' . $name . 'select'); // Warning: if you set submit button to disabled, post using 'Enter' will no more work if there is no another input submit. So we add a hidden button $ret .= ''; // Hidden button BEFORE so it is the one used when we submit with ENTER. - $ret .= ''; + $ret .= ''; $ret .= '
'; if (!empty($conf->use_javascript_ajax)) { $ret .= '