news : add publishoff
This commit is contained in:
parent
35efa6f16b
commit
293cf382c0
@ -139,6 +139,7 @@ class news extends common {
|
||||
$this->setData(['module', $this->getUrl(0),'posts', $newsId, [
|
||||
'content' => $this->getInput('newsAddContent', null),
|
||||
'publishedOn' => $this->getInput('newsAddPublishedOn', helper::FILTER_DATETIME, true),
|
||||
'publishedOff' => $this->getInput('newsAddPublishedOff', helper::FILTER_DATETIME),
|
||||
'state' => $this->getInput('newsAddState', helper::FILTER_BOOLEAN),
|
||||
'title' => $this->getInput('newsAddTitle', helper::FILTER_STRING_SHORT, true),
|
||||
'userId' => $this->getInput('newsAddUserId', helper::FILTER_ID, true)
|
||||
|
@ -41,19 +41,26 @@
|
||||
<div class="block">
|
||||
<h4>Options de publication</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="col4">
|
||||
<?php echo template::select('newsAddUserId', $module::$users, [
|
||||
'label' => 'Auteur',
|
||||
'selected' => $this->getUser('id')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<div class="col4">
|
||||
<?php echo template::date('newsAddPublishedOn', [
|
||||
'help' => 'La news est consultable à partir du moment ou la date de publication est passée.',
|
||||
'label' => 'Date de publication',
|
||||
'value' => time()
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::date('newsAddPublishedOff', [
|
||||
'help' => 'La news est consultable Jusqu\'à cette date si elle est spécifiée.',
|
||||
'label' => 'Date de dépublication',
|
||||
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'publishedOff'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user