New: Add id into select_category method.

This commit is contained in:
Laurent Destailleur 2014-10-18 02:12:10 +02:00
parent 58b15fa736
commit b43d96f86c
2 changed files with 3 additions and 1 deletions

View File

@ -2703,6 +2703,7 @@ class Form
* @param int $maxlength Maximum length for labels
* @param int $excludeafterid Exclude all categories after this leaf in category tree.
* @return void
* @see select_categories
*/
function select_all_categories($type, $selected='', $htmlname="parent", $maxlength=64, $excludeafterid=0)
{

View File

@ -307,6 +307,7 @@ class FormOther
* @param string $htmlname Name of combo list
* @param int $nocateg Show also an entry "Not categorized"
* @return string Html combo list code
* @see select_all_categories
*/
function select_categories($type,$selected=0,$htmlname='search_categ',$nocateg=0)
{
@ -318,7 +319,7 @@ class FormOther
$tab_categs = $static_categs->get_full_arbo($type);
// Print a select with each of them
$moreforfilter ='<select class="flat" name="'.$htmlname.'">';
$moreforfilter ='<select class="flat" id="select_categ_'.$htmlname.'" name="'.$htmlname.'">';
$moreforfilter.='<option value="">&nbsp;</option>'; // Should use -1 to say nothing
if (is_array($tab_categs))