Fix autoselect of category with 'auto'
This commit is contained in:
parent
dbfeba661d
commit
653fa38b06
@ -210,7 +210,7 @@ llxHeader("", $langs->trans("Categories"), $helpurl);
|
|||||||
if ($user->rights->categorie->creer)
|
if ($user->rights->categorie->creer)
|
||||||
{
|
{
|
||||||
// Create or add
|
// Create or add
|
||||||
if ($action == 'create' || $_POST["addcat"] == 'addcat')
|
if ($action == 'create' || GETPOST("addcat") == 'addcat')
|
||||||
{
|
{
|
||||||
dol_set_focus('#label');
|
dol_set_focus('#label');
|
||||||
|
|
||||||
|
|||||||
@ -4174,7 +4174,7 @@ class Form
|
|||||||
$output .= '<option value="-1"> </option>';
|
$output .= '<option value="-1"> </option>';
|
||||||
foreach ($cate_arbo as $key => $value)
|
foreach ($cate_arbo as $key => $value)
|
||||||
{
|
{
|
||||||
if ($cate_arbo[$key]['id'] == $selected || ($selected == 'auto' && count($cate_arbo) == 1))
|
if ($cate_arbo[$key]['id'] == $selected || ($selected === 'auto' && count($cate_arbo) == 1))
|
||||||
{
|
{
|
||||||
$add = 'selected ';
|
$add = 'selected ';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user