linl back to list if cancelled on create
This commit is contained in:
parent
1f87b8bb18
commit
6b808acfbb
@ -118,8 +118,11 @@ if (empty($reshook))
|
|||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$permissiontoadd = $user->rights->mymodule->write;
|
$permissiontoadd = $user->rights->mymodule->write;
|
||||||
$permissiontodelete = $user->rights->mymodule->delete || ($permissiontoadd && $object->status == 0);
|
$permissiontodelete = $user->rights->mymodule->delete;
|
||||||
if (empty($backtopage)) $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).'?id='.($id > 0 ? $id : '__ID__');
|
if (empty($backtopage)) {
|
||||||
|
if (empty($id)) $backtopage = dol_buildpath('/mymodule/myobject_list.php',1);
|
||||||
|
else $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).($id > 0 ? $id : '__ID__');
|
||||||
|
}
|
||||||
$backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1);
|
$backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1);
|
||||||
$triggermodname = 'MYMODULE_MYOBJECT_MODIFY'; // Name of trigger action code to execute when we modify record
|
$triggermodname = 'MYMODULE_MYOBJECT_MODIFY'; // Name of trigger action code to execute when we modify record
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user