mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Standardize code for action buttons Delete
This commit is contained in:
@@ -492,11 +492,8 @@ if ($action == 'create') {
|
||||
}
|
||||
}
|
||||
|
||||
if ($user->rights->deplacement->supprimer) {
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$id.'">'.$langs->trans('Delete').'</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">'.$langs->trans('Delete').'</a>';
|
||||
}
|
||||
$permissiontodelete = $user->rights->deplacement->supprimer;
|
||||
print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete);
|
||||
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user