2022-03-06 13:35:21 +01:00
|
|
|
<?php
|
|
|
|
// Lexique
|
2022-07-05 08:16:26 +02:00
|
|
|
include('./module/news/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_news.php');
|
|
|
|
|
2022-11-05 09:31:32 +01:00
|
|
|
// Passage de la langue d'administration à Tinymce et flatpickr
|
|
|
|
$lang_admin = $text['news_view']['edit'][12];
|
|
|
|
$lang_flatpickr = $text['news_view']['edit'][13];
|
|
|
|
?><script> var lang_admin = "<?php echo $lang_admin; ?>"; var lang_flatpickr = "<?php echo $lang_flatpickr; ?>";</script><?php
|
|
|
|
echo '<script src="'. helper::baseUrl(false).'core/vendor/tinymce/tinymce.min.js"></script>';
|
|
|
|
echo '<script src="'. helper::baseUrl(false).'core/vendor/tinymce/init.js"></script>';
|
|
|
|
echo '<link rel="stylesheet" type ="text/css" href="'.helper::baseUrl(false).'core/vendor/tinymce/init.css">';
|
|
|
|
|
2022-07-05 08:16:26 +02:00
|
|
|
echo template::formOpen('newsEditForm'); ?>
|
2022-01-31 09:10:49 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col2">
|
|
|
|
<?php echo template::button('newsEditBack', [
|
|
|
|
'class' => 'buttonGrey',
|
|
|
|
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
|
|
|
'ico' => 'left',
|
2022-07-05 08:16:26 +02:00
|
|
|
'value' => $text['news_view']['edit'][0]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col3 offset5">
|
|
|
|
<?php echo template::button('newsEditDraft', [
|
|
|
|
'uniqueSubmission' => true,
|
2022-07-05 08:16:26 +02:00
|
|
|
'value' => $text['news_view']['edit'][1]
|
2022-01-31 09:10:49 +01:00
|
|
|
]); ?>
|
|
|
|
<?php echo template::hidden('newsEditState', [
|
|
|
|
'value' => true
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col2">
|
|
|
|
<?php echo template::submit('newsEditSubmit', [
|
2022-07-05 08:16:26 +02:00
|
|
|
'value' => $text['news_view']['edit'][2],
|
2022-01-31 09:10:49 +01:00
|
|
|
'uniqueSubmission' => true
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col12">
|
|
|
|
<div class="block">
|
2022-07-05 08:16:26 +02:00
|
|
|
<h4><?php echo $text['news_view']['edit'][3]; ?></h4>
|
2022-01-31 09:10:49 +01:00
|
|
|
<?php echo template::text('newsEditTitle', [
|
2022-07-05 08:16:26 +02:00
|
|
|
'label' => $text['news_view']['edit'][4],
|
2022-01-31 09:10:49 +01:00
|
|
|
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'title'])
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php echo template::textarea('newsEditContent', [
|
|
|
|
'class' => 'editorWysiwyg',
|
|
|
|
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'content'])
|
|
|
|
]); ?>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col12">
|
|
|
|
<div class="block">
|
2022-07-05 08:16:26 +02:00
|
|
|
<h4><?php echo $text['news_view']['edit'][5]; ?></h4>
|
2022-01-31 09:10:49 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::select('newsEditUserId', $module::$users, [
|
2022-07-05 08:16:26 +02:00
|
|
|
'label' => $text['news_view']['edit'][6],
|
2022-01-31 09:10:49 +01:00
|
|
|
'selected' => $this->getUser('id')
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::date('newsEditPublishedOn', [
|
2022-07-05 08:16:26 +02:00
|
|
|
'help' => $text['news_view']['edit'][7],
|
|
|
|
'label' => $text['news_view']['edit'][8],
|
2022-01-31 09:10:49 +01:00
|
|
|
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'publishedOn'])
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
<div class="col4">
|
|
|
|
<?php echo template::date('newsEditPublishedOff', [
|
2022-07-05 08:16:26 +02:00
|
|
|
'help' => $text['news_view']['edit'][9],
|
|
|
|
'label' => $text['news_view']['edit'][10],
|
2022-01-31 09:10:49 +01:00
|
|
|
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'publishedOff'])
|
|
|
|
]); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php echo template::formClose(); ?>
|