Permalink
Browse files

MINOR Re-added LeftAndMain->EditForm() as a complement to getEditForm…

…() - 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...
1 parent 9e88dbb commit eef51ed50b00755dd451512d4e6d4946dc8071c6 @chillu chillu committed Nov 21, 2009
Showing with 12 additions and 0 deletions.
  1. +12 −0 code/LeftAndMain.php
View
@@ -821,6 +821,18 @@ public function deleteitems() {
}
/**
+ * 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
* from {@link DataObject->getCMSFields()} for the specific managed subclass
* defined in {@link LeftAndMain::$tree_class}.

0 comments on commit eef51ed

Please sign in to comment.