Comments Approval WIP

This commit is contained in:
Fred Tempez 2020-07-11 20:00:31 +02:00
parent 125378ec93
commit 29ef8f06f5
2 changed files with 21 additions and 5 deletions

View File

@ -350,7 +350,8 @@ class blog extends common {
'state' => $this->getInput('blogEditState', helper::FILTER_BOOLEAN), 'state' => $this->getInput('blogEditState', helper::FILTER_BOOLEAN),
'title' => $this->getInput('blogEditTitle', helper::FILTER_STRING_SHORT, true), 'title' => $this->getInput('blogEditTitle', helper::FILTER_STRING_SHORT, true),
'userId' => $newuserid, 'userId' => $newuserid,
'maxlengthcomment' => $this->getInput('blogEditlength', null) 'maxlengthcomment' => $this->getInput('blogEditLength'),
'commentApprove' => $this->getInput('blogEditCommentApprove')
]]); ]]);
// Supprime l'ancien article // Supprime l'ancien article
if($articleId !== $this->getUrl(2)) { if($articleId !== $this->getUrl(2)) {

View File

@ -74,10 +74,17 @@
'value' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'content']) 'value' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'content'])
]); ?> ]); ?>
<div class="row"> <div class="row">
<div class="col4"> <div class="col12">
<div class="block">
<h4>Permissions</h4>
</div>
</div>
</div>
<div class="row">
<div class="col5">
<div class="block"> <div class="block">
<h4>Options de publication</h4> <h4>Options de publication</h4>
<?php echo template::select('blogEditlength', $module::$longueur_comment,[ <?php echo template::select('blogEditLength', $module::$longueur_comment,[
'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.', 'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.',
'label' => 'Caractères par commentaire', 'label' => 'Caractères par commentaire',
'selected' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'maxlengthcomment']) 'selected' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'maxlengthcomment'])
@ -94,13 +101,21 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="col8"> <div class="col7">
<div class="block"> <div class="block">
<h4>Options des commentaires</h4> <h4>Commentaires</h4>
<?php echo template::checkbox('blogEditCloseComment', true, 'Fermer les commentaires', [ <?php echo template::checkbox('blogEditCloseComment', true, 'Fermer les commentaires', [
'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'closeComment']) 'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'closeComment'])
]); ?> ]); ?>
<div id="commentOptionsWrapper"> <div id="commentOptionsWrapper">
<div class="row">
<div class="col12">
<?php echo template::checkbox('blogEditCommentApprove', true, 'Approbation des commentaires', [
'checked' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'commentApprove']),
''
]); ?>
</div>
</div>
<div class="row"> <div class="row">
<div class="col7"> <div class="col7">
<?php echo template::checkbox('blogEditMailNotification', true, 'Notification des nouveaux commentaires par mail aux groupes', [ <?php echo template::checkbox('blogEditMailNotification', true, 'Notification des nouveaux commentaires par mail aux groupes', [