BUGFIX: Fixed redirection destionation of the modeladmin delete button on the detail form. (from r97179)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102709 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 06:59:57 +00:00
parent bce6ff833b
commit 88597e243a

View File

@ -382,6 +382,7 @@ class ModelAdmin_CollectionController extends Controller {
//$form->setFormAction(Controller::join_links($this->Link(), "search"));
$form->setFormMethod('get');
$form->setHTMLID("Form_SearchForm_" . $this->modelClass);
$form->disableSecurityToken();
$clearAction->useButtonTag = true;
$clearAction->addExtraClass('minorAction');
@ -947,7 +948,7 @@ class ModelAdmin_RecordController extends Controller {
public function doDelete($data, $form, $request) {
if($this->currentRecord->canDelete(Member::currentUser())) {
$this->currentRecord->delete();
Director::redirect($this->parentController->Link());
Director::redirect($this->parentController->Link('SearchForm?action=search'));
}
else Director::redirectBack();
return;