diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 71d311ad3effc..2005090f33357 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -376,8 +376,13 @@ $atleastonenotdefined = 0; // at least on buying price not defined - $tmpurlforbutton = 'javascript:console.log("click to add a product in kit");jQuery(".formtoaddinkit").toggle();'; - $morehtmlright = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $usercancreate ? 1 : 0); + $tmpurlforbutton = 'javascript:void(0);'; + $newButtonParams = [ + 'attr' => [ + 'onclick' => 'console.log("click to add a product in kit");jQuery(".formtoaddinkit").toggle();return false;', + ] + ]; + $morehtmlright = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $usercancreate ? 1 : 0, $newButtonParams); print load_fiche_titre($langs->trans("ProductAssociationList"), $morehtmlright, '');