mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR: added moderation message for non-ajax mode
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@103555 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
3ab7de6051
commit
5b6bec63aa
@ -330,13 +330,19 @@ class PageCommentInterface_Form extends Form {
|
||||
$comment->write();
|
||||
|
||||
Cookie::set("PageCommentInterface_Comment", '');
|
||||
|
||||
$moderationMsg = _t('PageCommentInterface_Form.AWAITINGMODERATION', "Your comment has been submitted and is now awaiting moderation.");
|
||||
|
||||
if(Director::is_ajax()) {
|
||||
if($comment->NeedsModeration){
|
||||
echo _t('PageCommentInterface_Form.AWAITINGMODERATION', "Your comment has been submitted and is now awaiting moderation.");
|
||||
echo $moderationMsg;
|
||||
} else{
|
||||
echo $comment->renderWith('PageCommentInterface_singlecomment');
|
||||
}
|
||||
} else {
|
||||
if($comment->NeedsModeration){
|
||||
$this->sessionMessage($moderationMsg, 'good');
|
||||
}
|
||||
// since it is not ajax redirect user down to their comment since it has been posted
|
||||
// get the pages url off the comments parent ID.
|
||||
if($comment->ParentID) {
|
||||
|
Loading…
Reference in New Issue
Block a user