FIX: Redirect to a URL that does not indicate an error, style moderation method

This commit is contained in:
Gordon Anderson 2016-02-10 16:09:54 +07:00
parent f187a02a72
commit 3610414ed0
5 changed files with 22 additions and 12 deletions

View File

@ -497,9 +497,9 @@ class CommentingController extends Controller
// we do not want to read a new URL when the form has already been submitted // we do not want to read a new URL when the form has already been submitted
// which in here, it hasn't been. // which in here, it hasn't been.
$form->loadDataFrom(array( $form->loadDataFrom(array(
'ParentID' => $record->ID, 'ParentID' => $record->ID,
'ReturnURL' => $this->request->getURL(), 'ReturnURL' => $this->request->getURL(),
'BaseClass' => $this->getBaseClass() 'BaseClass' => $this->getBaseClass()
)); ));
} }
@ -550,7 +550,6 @@ class CommentingController extends Controller
if (!$this->getOwnerRecord()) { if (!$this->getOwnerRecord()) {
return $this->httpError(404); return $this->httpError(404);
} }
// cache users data // cache users data
Cookie::set("CommentsForm_UserData", Convert::raw2json($data)); Cookie::set("CommentsForm_UserData", Convert::raw2json($data));
Cookie::set("CommentsForm_Comment", $data['Comment']); Cookie::set("CommentsForm_Comment", $data['Comment']);

View File

@ -16,6 +16,11 @@
line-height: 40px; line-height: 40px;
margin-bottom: 0; margin-bottom: 0;
} }
.comments-holder-container #moderated {
border: solid #999 1px;
padding: 20px;
font-style: italic;
}
.comments-holder-container .comments-list { .comments-holder-container .comments-list {
margin: 0; margin: 0;
} }

View File

@ -1,6 +1,6 @@
{ {
"version": 3, "version": 3,
"mappings": "AAAA,0BAA2B;EAC1B,KAAK,EAAE,IAAI;;AAEX,iCAAO;EACN,KAAK,EAAE,IAAI;;AAGZ;kCACQ;EACP,SAAS,EAAE,KAAK;;AAGjB,+BAAK;EACJ,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,GAAG;;AAGlB,qCAAW;EACV,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,CAAC;;AAGjB,yCAAe;EACd,MAAM,EAAE,CAAC;;AAGV,yCAAe;EACd,MAAM,EAAE,MAAM;;AAIf,2CAAiB;EAChB,UAAU,EA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AAW,EAAE,QAAQ;EACrB,SAAS,EAAE,UAAU;;AAErB,mCAAa;EACZ,aAAa,EAAE,CAAC;;AAIf,kCAA0B;EAEtB,OAAO,EAAE,cAAc;EAGvB,UAAU,EAAE,KAAK;;AAGxB,cAAM;EACL,SAAS,EAAE,IAAI;;AAEf,qBAAS;EACR,OAAO,EAAE,8BAA8B;;AAKxC,oCAAgB;EACf,MAAM,EAAE,gBAAgB;;AAI1B,cAAM;EACL,aAAa,EAAE,IAAI;;AAGpB,sBAAgB;EACf,MAAM,EAAE,iBAAiB;EACzB,aAAa,EAAE,GAAG;EAClB,OAAO,EAAE,aAAa;;AAGvB,mCAA2B;EAC1B,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;EAClB,MAAM,EAAE,UAAU;EAClB,WAAW,EAAE,eAAe;;AAE5B,8DAA2B;EAC1B,OAAO,EAAE,MAAM;;AAEhB,2DAAwB;EACvB,OAAO,EAAE,UAAU;;;AAKtB,yBAA0B;EACzB,WAAW,EAAE,CAAC;;;AAGf,mBAAoB;EACnB,KAAK,EAAE,KAAK;;;AAGb,2BAA4B;EAC3B,KAAK,EAAE,IAAI;;;AAGZ,qBAAsB;EACrB,MAAM,EAAE,WAAW;;AAEnB,wCAAmB;EAClB,YAAY,EAAE,IAAI;;;AAIpB,uBAAwB;EACvB,UAAU,EAAE,IAAI",
"sources": ["../scss/comments.scss"], "sources": ["../scss/comments.scss"],
"names": [], "names": [],
"file": "comments.css" "file": "comments.css"

View File

@ -20,6 +20,12 @@
margin-bottom: 0; margin-bottom: 0;
} }
#moderated {
border: solid #999 1px;
padding: 20px;
font-style: italic;
}
.comments-list { .comments-list {
margin: 0; margin: 0;
} }

View File

@ -7,7 +7,7 @@
<% if $AddCommentForm %> <% if $AddCommentForm %>
<% if $canPostComment %> <% if $canPostComment %>
<% if $ModeratedSubmitted %> <% if $ModeratedSubmitted %>
<p id="{$CommentHolderID}_PostCommentForm_error" class="message good"><% _t('CommentsInterface_ss.AWAITINGMODERATION', 'Your comment has been submitted and is now awaiting moderation.') %></p> <p id="moderated" class="message good"><% _t('CommentsInterface_ss.AWAITINGMODERATION', 'Your comment has been submitted and is now awaiting moderation.') %></p>
<% end_if %> <% end_if %>
$AddCommentForm $AddCommentForm
<% else %> <% else %>