Skip to content

Commit

Permalink
MINOR Re-added LeftAndMain->EditForm() as a complement to getEditForm…
Browse files Browse the repository at this point in the history
…() - it is necessary for form submissions as well as for template getters

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92712 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
chillu committed Nov 21, 2009
1 parent 9e88dbb commit eef51ed
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions code/LeftAndMain.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -820,6 +820,18 @@ public function deleteitems() {
return FormResponse::respond(); return FormResponse::respond();
} }


/**
* Uses {@link getEditForm()} to retrieve an edit form
* based on the submitted data. Used for form submissions,
* not for template rendering.
*
* @param HTTPRequest $request
* @return Form
*/
function EditForm($request = null) {
return $this->getEditForm($request ? $request->requestVar('ID') : null);
}

/** /**
* Gets the edit form of a specific record. Will usually construct itself * Gets the edit form of a specific record. Will usually construct itself
* from {@link DataObject->getCMSFields()} for the specific managed subclass * from {@link DataObject->getCMSFields()} for the specific managed subclass
Expand Down

0 comments on commit eef51ed

Please sign in to comment.