N°1836 - Cancel of an object creation form now redirects to the search page of the same class (instead of just showing "operation cancelled")

This commit is contained in:
Molkobain
2021-08-14 23:33:21 +02:00
parent 58e35ea33b
commit 8e3cc471df

View File

@@ -2894,7 +2894,7 @@ EOF
$oPage->add($oAppContext->GetForForm());
// Hook the cancel button via jQuery so that it can be unhooked easily as well if needed
$sDefaultUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=cancel&'.$oAppContext->GetForLink();
$sDefaultUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php?operation=search_form&class='.$sClass.'&'.$oAppContext->GetForLink();
$oPage->add_ready_script("$('#form_{$this->m_iFormId} button.cancel').on('click', function() { BackToDetails('$sClass', $iKey, '$sDefaultUrl', $sJSToken)} );");
$iFieldsCount = count($aFieldsMap);