- Bug fix: when creating a new object the "Cancel" button must go somewhere !

SVN:trunk[1002]
This commit is contained in:
Denis Flaven
2010-11-30 15:55:40 +00:00
parent 018344578e
commit 9d1df1b799
5 changed files with 20 additions and 3 deletions

View File

@@ -1351,7 +1351,8 @@ EOF
$oPage->add("<button type=\"submit\" class=\"action\"><span>".Dict::S('UI:Button:Create')."</span></button>\n");
}
// Hook the cancel button via jQuery so that it can be unhooked easily as well if needed
$oPage->add_ready_script("$('#form_{$this->m_iFormId} button.cancel').click( function() { BackToDetails('$sClass', $iKey)} );");
$sDefaultUrl = '../pages/UI.php?operation=cancel';
$oPage->add_ready_script("$('#form_{$this->m_iFormId} button.cancel').click( function() { BackToDetails('$sClass', $iKey, '$sDefaultUrl')} );");
$oPage->add("</form>\n");
$iFieldsCount = count($aFieldsMap);