Added test button for ImageFormAction

This commit is contained in:
Sam Minnee 2009-08-24 06:59:08 +00:00
parent 9998db2e9e
commit 1df4995f00
2 changed files with 8 additions and 1 deletions

View File

@ -41,7 +41,10 @@ class TestPage_Controller extends Page_Controller {
*/
function Form() {
$fields = $this->getCMSFields();
$actions = new FieldSet(new FormAction("save", "Save"));
$actions = new FieldSet(
new FormAction("save", "Save"),
new ImageFormAction("gohome", "Go home", "frameworktest/images/test-button.png")
);
$form = new Form($this, "Form", $fields, $actions);
$form->loadDataFrom($this->dataRecord);
return $form;
@ -53,6 +56,10 @@ class TestPage_Controller extends Page_Controller {
Director::redirectBack();
}
function gohome() {
Director::redirect("./");
}
/**
* Create a bunch of pages
*/

BIN
images/test-button.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB