Skip to content

Commit

Permalink
linl back to list if cancelled on create
Browse files Browse the repository at this point in the history
  • Loading branch information
bafbes committed Jan 9, 2019
1 parent fbd490d commit 7262f90
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions htdocs/modulebuilder/template/myobject_card.php
Expand Up @@ -118,8 +118,11 @@
$error=0;

$permissiontoadd = $user->rights->mymodule->write;
$permissiontodelete = $user->rights->mymodule->delete || ($permissiontoadd && $object->status == 0);
if (empty($backtopage)) $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).'?id='.($id > 0 ? $id : '__ID__');
$permissiontodelete = $user->rights->mymodule->delete;
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);
$triggermodname = 'MYMODULE_MYOBJECT_MODIFY'; // Name of trigger action code to execute when we modify record

Expand Down

0 comments on commit 7262f90

Please sign in to comment.