diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index f3e6eca2715..9d66e35f9f1 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -53,6 +53,7 @@ $backtopage = GETPOST('backtopage', 'alpha'); $label = (string) GETPOST('label', 'alphanohtml'); $description = (string) GETPOST('description', 'restricthtml'); $color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('color', 'alphanohtml')); +$position = (int) GETPOST('position', 'int'); $visible = (int) GETPOST('visible', 'int'); $parent = (int) GETPOST('parent', 'int'); @@ -95,7 +96,7 @@ $error = 0; /* * Actions */ -$parameters = array('socid' => $socid, 'origin' => $origin, 'catorigin' => $catorigin, 'type' => $type, 'urlfrom' => $urlfrom, 'backtopage' => $backtopage, 'label' => $label, 'description' => $description, 'color' => $color, 'visible' => $visible, 'parent' => $parent); +$parameters = array('socid' => $socid, 'origin' => $origin, 'catorigin' => $catorigin, 'type' => $type, 'urlfrom' => $urlfrom, 'backtopage' => $backtopage, 'label' => $label, 'description' => $description, 'color' => $color, 'position' => $position, 'visible' => $visible, 'parent' => $parent); // Note that $action and $object may be modified by some hooks $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); if ($reshook < 0) { @@ -138,6 +139,7 @@ if (empty($reshook)) { } $object->label = $label; $object->color = $color; + $object->position = $position; $object->description = dol_htmlcleanlastbr($description); $object->socid = ($socid > 0 ? $socid : 0); $object->visible = $visible; @@ -259,6 +261,11 @@ if ($user->hasRight('categorie', 'creer')) { print $formother->selectColor($color, 'color'); print ''; + // Position + print '