mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX: Fixed front end post entry form validation and its test (merged from r108801)
This commit is contained in:
parent
c925304eca
commit
475a190112
@ -238,7 +238,7 @@ class BlogHolder_Controller extends BlogTree_Controller {
|
|||||||
|
|
||||||
$submitAction = new FormAction('postblog', _t('BlogHolder.POST', 'Post blog entry'));
|
$submitAction = new FormAction('postblog', _t('BlogHolder.POST', 'Post blog entry'));
|
||||||
$actions = new FieldSet($submitAction);
|
$actions = new FieldSet($submitAction);
|
||||||
$validator = new RequiredFields('Title','Content');
|
$validator = new RequiredFields('Title','BlogPost');
|
||||||
|
|
||||||
$form = new Form($this, 'BlogEntryForm',$fields, $actions,$validator);
|
$form = new Form($this, 'BlogEntryForm',$fields, $actions,$validator);
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class BlogHolderFunctionalTest extends FunctionalTest {
|
|||||||
$data = array(
|
$data = array(
|
||||||
'Title'=>'Disallowed',
|
'Title'=>'Disallowed',
|
||||||
'Author'=>'Disallowed',
|
'Author'=>'Disallowed',
|
||||||
'Content'=>'Disallowed',
|
'BlogPost'=>'Disallowed',
|
||||||
'action_postblog' => 'Post blog entry',
|
'action_postblog' => 'Post blog entry',
|
||||||
'SecurityID' => $securityID
|
'SecurityID' => $securityID
|
||||||
);
|
);
|
||||||
@ -40,7 +40,7 @@ class BlogHolderFunctionalTest extends FunctionalTest {
|
|||||||
$data = array(
|
$data = array(
|
||||||
'Title'=>'Allowed',
|
'Title'=>'Allowed',
|
||||||
'Author'=>'Allowed',
|
'Author'=>'Allowed',
|
||||||
'Content'=>'Allowed',
|
'BlogPost'=>'Allowed',
|
||||||
'action_postblog' => 'Post blog entry',
|
'action_postblog' => 'Post blog entry',
|
||||||
'SecurityID' => $securityID
|
'SecurityID' => $securityID
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user