mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 09:06:02 +00:00
BUG: fixes for 3.1 version, updated function calls
This commit is contained in:
parent
71a988843a
commit
1198eb9228
@ -41,10 +41,16 @@ class GridFieldTestPage extends TestPage {
|
|||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class GridFieldTestPage_Controller extends Page_Controller {
|
class GridFieldTestPage_Controller extends Page_Controller {
|
||||||
|
|
||||||
|
private static $allowed_actions = array(
|
||||||
|
'Form',
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
|
@ -6,6 +6,10 @@ class TestFileUploadPage extends TestPage{
|
|||||||
|
|
||||||
class TestFileUploadPage_Controller extends TestPage_Controller{
|
class TestFileUploadPage_Controller extends TestPage_Controller{
|
||||||
|
|
||||||
|
private static $allowed_actions = array(
|
||||||
|
'Form'
|
||||||
|
);
|
||||||
|
|
||||||
function Form(){
|
function Form(){
|
||||||
$fields = new FieldList(
|
$fields = new FieldList(
|
||||||
new EmailField('Email', 'EmailField'),
|
new EmailField('Email', 'EmailField'),
|
||||||
@ -25,6 +29,6 @@ class TestFileUploadPage_Controller extends TestPage_Controller{
|
|||||||
$member = new Member();
|
$member = new Member();
|
||||||
$form->saveInto($member);
|
$form->saveInto($member);
|
||||||
$member->write();
|
$member->write();
|
||||||
Director::redirectBack();
|
$this->redirectBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -72,7 +72,7 @@ class TestPage_Controller extends Page_Controller {
|
|||||||
function save($data, $form) {
|
function save($data, $form) {
|
||||||
$form->saveInto($this->dataRecord);
|
$form->saveInto($this->dataRecord);
|
||||||
$this->dataRecord->write();
|
$this->dataRecord->write();
|
||||||
Director::redirectBack();
|
$this->redirectBack();
|
||||||
}
|
}
|
||||||
|
|
||||||
function gohome() {
|
function gohome() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user