DolGetButtonAction add $usercancreate
This commit is contained in:
parent
22aae26f71
commit
79a0aa816f
@ -2549,7 +2549,7 @@ if ($action != 'create' && $action != 'edit') {
|
|||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
if ($usercancreate) {
|
if ($usercancreate) {
|
||||||
if (!isset($object->no_button_edit) || $object->no_button_edit <> 1) {
|
if (!isset($object->no_button_edit) || $object->no_button_edit <> 1) {
|
||||||
print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, '', $user->rights->societe->creer);
|
print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=edit&token='.newToken().'&id='.$object->id, '', $usercancreate);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($object->no_button_copy) || $object->no_button_copy <> 1) {
|
if (!isset($object->no_button_copy) || $object->no_button_copy <> 1) {
|
||||||
@ -2557,7 +2557,7 @@ if ($action != 'create' && $action != 'edit') {
|
|||||||
$cloneProductUrl = '';
|
$cloneProductUrl = '';
|
||||||
$cloneButtonId = 'action-clone';
|
$cloneButtonId = 'action-clone';
|
||||||
}
|
}
|
||||||
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $cloneProductUrl, $cloneButtonId, $user->rights->societe->creer);
|
print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $cloneProductUrl, $cloneButtonId, $usercancreate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$object_is_used = $object->isObjectUsed($object->id);
|
$object_is_used = $object->isObjectUsed($object->id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user