diff --git a/htdocs/product/card.php b/htdocs/product/card.php
index 64c6b6817bd..05475563e17 100644
--- a/htdocs/product/card.php
+++ b/htdocs/product/card.php
@@ -2539,6 +2539,11 @@ print $formconfirm;
* Action bar
*/
if ($action != 'create' && $action != 'edit') {
+ $cloneProductUrl = $_SERVER["PHP_SELF"].'?action=clone&token='.newToken();
+ $cloneButtonId = 'action-clone-no-ajax';
+ $deleteProductUrl = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id;
+ $deleteButtonId = 'action-delete-no-ajax';
+
print "\n".'
'."\n";
$parameters = array();
@@ -2547,14 +2552,16 @@ if ($action != 'create' && $action != 'edit') {
if ($usercancreate) {
if (!isset($object->no_button_edit) || $object->no_button_edit <> 1) {
print '
id.'">'.$langs->trans("Modify").'';
+ print dolGetButtonAction('', $langs->trans('ModifyGREG'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, '', $user->rights->societe->creer);
}
if (!isset($object->no_button_copy) || $object->no_button_copy <> 1) {
if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) {
- print '
'.$langs->trans('ToClone').''."\n";
- } else {
- print '
id.'">'.$langs->trans("ToClone").'';
+ //print '
'.$langs->trans('ToClone').''."\n";
+ $cloneProductUrl = '';
+ $cloneButtonId = 'action-clone';
}
+ print dolGetButtonAction($langs->trans('ToCloneGREG'), '', 'default', $cloneProductUrl, $cloneButtonId, $user->rights->societe->creer);
}
}
$object_is_used = $object->isObjectUsed($object->id);
@@ -2563,6 +2570,8 @@ if ($action != 'create' && $action != 'edit') {
if (empty($object_is_used) && (!isset($object->no_button_delete) || $object->no_button_delete <> 1)) {
if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) {
print '
'.$langs->trans('Delete').''."\n";
+ //$deleteProductUrl = '';
+ //$cloneButtonId = 'action-delete';
} else {
print '
id.'">'.$langs->trans("Delete").'';
}
@@ -2572,6 +2581,8 @@ if ($action != 'create' && $action != 'edit') {
} else {
print '
'.$langs->trans("Delete").'';
}
+ print dolGetButtonAction($langs->trans('deleteGREG'), '', 'danger', $deleteProductUrl, $deleteButtonId, $user->rights->societe->creer);
+ print dolGetButtonAction($langs->trans('DeleteNEW'), '', 'danger', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', $user->rights->societe->creer);
}
print "\n
\n";