mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
BUGFIX: added validation to the page comment form
Fixes #2782 (from r111452) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112803 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2ae76958bb
commit
f124be7f95
@ -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