forked from Wavyzz/dolibarr
Fix: wrong return when cancel
This commit is contained in:
@@ -121,17 +121,6 @@ $hookmanager->initHooks(array('membercard','globalcard'));
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($cancel) {
|
|
||||||
|
|
||||||
$action='';
|
|
||||||
|
|
||||||
if (! empty($backtopage))
|
|
||||||
{
|
|
||||||
header("Location: ".$backtopage);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$parameters=array('id'=>$id, 'rowid'=>$id, 'objcanvas'=>$objcanvas);
|
$parameters=array('id'=>$id, 'rowid'=>$id, 'objcanvas'=>$objcanvas);
|
||||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||||
@@ -988,8 +977,15 @@ else
|
|||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("AddMember").'">';
|
print '<input type="submit" name="button" class="button" value="'.$langs->trans("AddMember").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
|
if (! empty($backtopage))
|
||||||
|
{
|
||||||
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'">';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">';
|
||||||
|
}
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user