ZwiiCMS/module/news/view/edit/edit.php

72 lines
2.5 KiB
PHP
Raw Normal View History

2018-04-02 08:29:19 +02:00
<?php echo template::formOpen('newsEditForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('newsEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
2022-02-18 12:43:48 +01:00
'value' => template::ico('left')
2018-04-02 08:29:19 +02:00
]); ?>
</div>
2022-02-18 12:43:48 +01:00
<div class="col2 offset6">
2018-04-02 08:29:19 +02:00
<?php echo template::button('newsEditDraft', [
'uniqueSubmission' => true,
2023-02-13 14:47:26 +01:00
'value' => helper::translate('Brouillon')
2018-04-02 08:29:19 +02:00
]); ?>
<?php echo template::hidden('newsEditState', [
'value' => true
]); ?>
</div>
<div class="col2">
<?php echo template::submit('newsEditSubmit', [
'value' => 'Publier',
'uniqueSubmission' => true
2018-04-02 08:29:19 +02:00
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
2023-02-13 14:39:09 +01:00
<h4><?php echo helper::translate('Informations générales');?></h4>
2018-04-02 08:29:19 +02:00
<?php echo template::text('newsEditTitle', [
'label' => 'Titre',
2020-11-17 09:47:45 +01:00
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'title'])
2018-04-02 08:29:19 +02:00
]); ?>
</div>
</div>
</div>
<?php echo template::textarea('newsEditContent', [
'class' => 'editorWysiwyg',
2020-11-17 09:47:45 +01:00
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'content'])
2018-04-02 08:29:19 +02:00
]); ?>
<div class="row">
<div class="col12">
<div class="block">
2023-02-13 14:39:09 +01:00
<h4><?php echo helper::translate('Options de publication');?></h4>
2018-04-02 08:29:19 +02:00
<div class="row">
2021-05-03 22:18:38 +02:00
<div class="col4">
2018-04-02 08:29:19 +02:00
<?php echo template::select('newsEditUserId', $module::$users, [
'label' => 'Auteur',
'selected' => $this->getUser('id')
]); ?>
</div>
2021-05-03 22:18:38 +02:00
<div class="col4">
2018-04-02 08:29:19 +02:00
<?php echo template::date('newsEditPublishedOn', [
2023-02-27 15:03:01 +01:00
'help' => 'La news est consultable à partir du moment où la date de publication est passée.',
2018-04-02 08:29:19 +02:00
'label' => 'Date de publication',
2023-02-17 10:59:25 +01:00
'type' => 'datetime-local',
2020-11-17 09:47:45 +01:00
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'publishedOn'])
2018-04-02 08:29:19 +02:00
]); ?>
</div>
2021-05-03 22:18:38 +02:00
<div class="col4">
<?php echo template::date('newsEditPublishedOff', [
2021-05-13 22:58:12 +02:00
'help' => 'La news est consultable Jusqu\'à cette date si elle est spécifiée. Pour annuler la date de dépublication, sélectionnez une date antérieure à la publication.',
2021-05-03 22:18:38 +02:00
'label' => 'Date de dépublication',
2023-02-17 10:59:25 +01:00
'type' => 'datetime-local',
2021-05-03 22:18:38 +02:00
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'publishedOff'])
]); ?>
</div>
2018-04-02 08:29:19 +02:00
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>