mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
BUGFIX: added validation to the page comment form
Fixes #2782 git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@111452 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6bf7bd1819
commit
a584a1f516
@ -194,8 +194,7 @@ class PageCommentInterface extends RequestHandler {
|
||||
$fields->push(new TextareaField("Comment", _t('PageCommentInterface.YOURCOMMENT', "Comments")));
|
||||
|
||||
$form = new PageCommentInterface_Form($this, "PostCommentForm", $fields, new FieldSet(
|
||||
new FormAction("postcomment", _t('PageCommentInterface.POST', 'Post'))
|
||||
));
|
||||
new FormAction("postcomment", _t('PageCommentInterface.POST', 'Post'))), new RequiredFields('Name', 'Comment'));
|
||||
|
||||
// Set it so the user gets redirected back down to the form upon form fail
|
||||
$form->setRedirectToFormOnValidationError(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user