[*] MO : productComments - It's now possible to delete comments, beside moderation

This commit is contained in:
bMancone
2011-08-29 16:21:57 +00:00
parent 5c64f12662
commit 081b8e7aa5
5 changed files with 110 additions and 2 deletions
+21
View File
@@ -32,6 +32,14 @@ function getCommentForm()
return (document.comment_form);
}
function getCommentDeleteForm()
{
if (document.forms)
return (document.forms['delete_comment_form']);
else
return (document.delete_comment_form);
}
function acceptComment(id)
{
var form = getCommentForm();
@@ -51,6 +59,19 @@ function deleteComment(id)
form.submit();
}
function delComment(id, confirmation)
{
var answer = confirm(confirmation);
if (answer)
{
var form = getCommentDeleteForm();
if (id)
form.elements['delete_id_product_comment'].value = id;
form.elements['delete_action'].value = 'delete';
form.submit();
}
}
function getCriterionForm()
{
if (document.forms)