From 3c7fe6029fa21b4b9a30c370b9aa615a79f32234 Mon Sep 17 00:00:00 2001 From: priojk Date: Wed, 29 Mar 2023 09:48:11 +0200 Subject: [PATCH] change action to start with create --- htdocs/fourn/class/fournisseur.product.class.php | 2 +- htdocs/product/fournisseurs.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 6dbb252af03..743d8d7b33c 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -1253,7 +1253,7 @@ class ProductFournisseur extends Product $label .= $this->displayPriceProductFournisseurLog($logPrices); } - $url = DOL_URL_ROOT.'/product/fournisseurs.php?id='.((int) $this->id).'&action=add_price&token='.newToken().'&socid='.((int) $this->fourn_id).'&rowid='.((int) $this->product_fourn_price_id); + $url = DOL_URL_ROOT.'/product/fournisseurs.php?id='.((int) $this->id).'&action=create_price&token='.newToken().'&socid='.((int) $this->fourn_id).'&rowid='.((int) $this->product_fourn_price_id); if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index edc192fc097..b5a8a076a0e 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -346,7 +346,7 @@ if (empty($reshook)) { $db->rollback(); } } else { - $action = 'add_price'; + $action = 'create_price'; } } } @@ -467,7 +467,7 @@ if ($id > 0 || $ref) { // Form to add or update a price - if (($action == 'add_price' || $action == 'update_price') && $usercancreate) { + if (($action == 'create_price' || $action == 'update_price') && $usercancreate) { $langs->load("suppliers"); print "\n"; @@ -507,7 +507,7 @@ if ($id > 0 || $ref) { $reshook = $hookmanager->executeHooks('formCreateThirdpartyOptions', $parameters, $object, $action); if (empty($reshook)) { if (empty($form->result)) { - print ''; + print ''; print img_picto($langs->trans("CreateDolibarrThirdPartySupplier"), 'add', 'class="marginleftonly"'); print ''; } @@ -904,12 +904,12 @@ END; print '
'."\n"; - if ($action != 'add_price' && $action != 'update_price') { + if ($action != 'create_price' && $action != 'update_price') { $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { if ($usercancreate) { - print ''; + print ''; print $langs->trans("AddSupplierPrice").''; } }