Fix autoselect of category with 'auto'
This commit is contained in:
parent
2851bac0af
commit
7278a8c17f
@ -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');
|
||||||
|
|
||||||
|
|||||||
@ -4249,7 +4249,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