fix recaptcha reply-to-comment form bug.

svn path=/plone.app.discussion/trunk/; revision=29433
This commit is contained in:
Timo Stollenwerk 2009-08-28 12:03:34 +00:00
parent f7f10a5572
commit 1747a3655b

View File

@ -43,10 +43,18 @@ jq(document).ready(function() {
var reply_button = comment_div.find(".reply-to-comment-button");
/* Clone the reply div at the end of the page template that contains
* the regular comment form and insert it after the reply button of the
* current comment.
* the regular comment form.
*/
var reply_div = jq("#commenting").clone(true);
/* Remove the ReCaptcha JS code before appending the form. If not
* removed, this causes problems
*/
reply_div.find("#formfield-form-widgets-captcha").find("script").remove();
/* Insert the cloned comment form right after the reply button of the
* current comment.
*/
reply_div.appendTo(comment_div).css("display", "none");
/* Remove id="reply" attribute, since we use it to uniquely