Skip to content

Commit 125b61d

Browse files
FIX #33595 - Click on add component for virtual product (#33596)
1 parent eaf2194 commit 125b61d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

htdocs/product/composition/card.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,13 @@
376376

377377
$atleastonenotdefined = 0; // at least on buying price not defined
378378

379-
$tmpurlforbutton = 'javascript:console.log("click to add a product in kit");jQuery(".formtoaddinkit").toggle();';
380-
$morehtmlright = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $usercancreate ? 1 : 0);
379+
$tmpurlforbutton = 'javascript:void(0);';
380+
$newButtonParams = [
381+
'attr' => [
382+
'onclick' => 'console.log("click to add a product in kit");jQuery(".formtoaddinkit").toggle();return false;',
383+
]
384+
];
385+
$morehtmlright = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $tmpurlforbutton, '', $usercancreate ? 1 : 0, $newButtonParams);
381386

382387
print load_fiche_titre($langs->trans("ProductAssociationList"), $morehtmlright, '');
383388

0 commit comments

Comments
 (0)