From dc3d7dbe7c0eea7e0e266c46f4fdb8f365656c87 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Tue, 27 Oct 2020 21:37:56 +0100 Subject: [PATCH] message de confrmation et de rejet --- module/blog/blog.php | 2 +- module/blog/view/comment/comment.js.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/blog/blog.php b/module/blog/blog.php index 26826c94..0d20088f 100644 --- a/module/blog/blog.php +++ b/module/blog/blog.php @@ -179,7 +179,7 @@ class blog extends common { $comment['approval'] = array_key_exists('approval', $comment) === false ? true : $comment['approval'] ; if ( $this->getData(['module', $this->getUrl(0), $this->getUrl(2),'commentApproved']) === true) { $buttonApproval = template::button('blogCommentApproved' . $commentIds[$i], [ - 'class' => $comment['approval'] === true ? 'blogCommentReject buttonGreen' : 'blogCommentApproved buttonRed' , + 'class' => $comment['approval'] === true ? 'blogCommentRejected buttonGreen' : 'blogCommentApproved buttonRed' , 'href' => helper::baseUrl() . $this->getUrl(0) . '/commentApprove/' . $this->getUrl(2) . '/' . $commentIds[$i] . '/' . $_SESSION['csrf'] , 'value' => $comment['approval'] === true ? 'A' : 'R' ]); diff --git a/module/blog/view/comment/comment.js.php b/module/blog/view/comment/comment.js.php index e79aae5b..fc6f7aaa 100644 --- a/module/blog/view/comment/comment.js.php +++ b/module/blog/view/comment/comment.js.php @@ -25,7 +25,7 @@ $(".blogCommentDelete").on("click", function() { /** * Confirmation d'approbation */ -$(".blogCommentApprove").on("click", function() { +$(".blogCommentApproved").on("click", function() { var _this = $(this); var nom = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>"; return core.confirm("Approuver le commentaire de l'article " + nom + " ?", function() { @@ -36,7 +36,7 @@ $(".blogCommentApprove").on("click", function() { /** * Confirmation de rejet */ -$(".blogCommentReject").on("click", function() { +$(".blogCommentRejected").on("click", function() { var _this = $(this); var nom = "getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>"; return core.confirm("Rejeter le commentaire de l'article " + nom + " ?", function() {