2
0
forked from Wavyzz/dolibarr

Standardize code for action buttons Delete

This commit is contained in:
Laurent Destailleur
2022-10-10 11:39:50 +02:00
parent 221b2dc288
commit ae4f8b23d5
35 changed files with 88 additions and 135 deletions

View File

@@ -501,7 +501,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
*/
// Delete (need delete permission, or if draft, just need create/modify permission)
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete);
}
print '</div>'."\n";
}