From f74fd049aa7cc61db41df60038e8c9f3472abd5c Mon Sep 17 00:00:00 2001 From: Regis Houssin <regis@dolibarr.fr> Date: Wed, 8 Oct 2008 08:35:22 +0000 Subject: [PATCH] Added ability to assign a category of product to a customer --- htdocs/categories/edit.php | 1 + htdocs/categories/viewcat.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 8e27ca708a9..954241e655d 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -160,6 +160,7 @@ else print '<tr><td>'.$langs->trans("ContentsVisibleByAll").'</td><td>'; print $html->selectyesno("visible",$categorie->visible,1); print '</td></tr>'; + print '<input type="hidden" name="socid" value="'.$categorie->socid.'">'; } print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'">'; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 63b4428234b..b7659fa2b9c 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -161,7 +161,8 @@ print "<div class='tabsAction'>\n"; if ($user->rights->categorie->creer) { - print "<a class='butAction' href='edit.php?id=".$c->id."&type=".$type."'>".$langs->trans("Modify")."</a>"; + $socid = ($c->socid ? "&socid=".$c->socid : ""); + print "<a class='butAction' href='edit.php?id=".$c->id.$socid."&type=".$type."'>".$langs->trans("Modify")."</a>"; } if ($user->rights->categorie->supprimer) -- GitLab