message de confrmation et de rejet

This commit is contained in:
fredtempez 2020-10-27 21:37:56 +01:00
parent c46907396c
commit dc3d7dbe7c
2 changed files with 3 additions and 3 deletions

View File

@ -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'
]);

View File

@ -25,7 +25,7 @@ $(".blogCommentDelete").on("click", function() {
/**
* Confirmation d'approbation
*/
$(".blogCommentApprove").on("click", function() {
$(".blogCommentApproved").on("click", function() {
var _this = $(this);
var nom = "<?php echo $this->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 = "<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'title' ]); ?>";
return core.confirm("Rejeter le commentaire de l'article " + nom + " ?", function() {