diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 13096ddcd40..d143d6fc9c6 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -111,10 +111,27 @@ if ($reshook < 0) { } if (empty($reshook)) { - // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) { - header("Location: ".$backtopage); - exit; + $backurlforlist = DOL_URL_ROOT.'/contact/list.php'; + + if (empty($backtopage) || ($cancel && empty($id))) { + if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = DOL_URL_ROOT.'/contact/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__'); + } + } + } + + if ($cancel) { + if (!empty($backtopageforcancel)) { + header("Location: ".$backtopageforcancel); + exit; + } elseif (!empty($backtopage)) { + header("Location: ".$backtopage); + exit; + } + $action = ''; } // Creation utilisateur depuis contact diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index d9c91a6df13..8e2940272af 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -123,8 +123,6 @@ ConferenceIsNotConfirmed=Subcription not available, conference is not confirmed DateMustBeBeforeThan=%s must be before %s DateMustBeAfterThan=%s must be after %s -NewSubscription=Registration - # # Vote page # diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 2fa00ae7f33..b80656c3c2f 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -68,7 +68,7 @@ DeleteAMemberType=Delete a member type ConfirmDeleteMemberType=Are you sure you want to delete this member type? MemberTypeDeleted=Member type deleted MemberTypeCanNotBeDeleted=Member type can not be deleted -NewSubscription=New subscription +NewSubscription=New contribution NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription (if already a member), please contact foundation board instead by email %s. Subscription=Contribution Subscriptions=Contributions diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 5107ed14b0a..a60d256fe21 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -201,6 +201,29 @@ if ($reshook < 0) { } if (empty($reshook)) { + $backurlforlist = DOL_URL_ROOT.'/product/list.php'; + + if (empty($backtopage) || ($cancel && empty($id))) { + if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { + $backtopage = $backurlforlist; + } else { + $backtopage = DOL_URL_ROOT.'/product/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__'); + } + } + } + + if ($cancel) { + if (!empty($backtopageforcancel)) { + header("Location: ".$backtopageforcancel); + exit; + } elseif (!empty($backtopage)) { + header("Location: ".$backtopage); + exit; + } + $action = ''; + } + // Type if ($action == 'setfk_product_type' && $usercancreate) { $result = $object->setValueFrom('fk_product_type', GETPOST('fk_product_type'), '', null, 'text', '', $user, 'PRODUCT_MODIFY');