102 lines
2.9 KiB
PHP
102 lines
2.9 KiB
PHP
<?php
|
|
// Lexique
|
|
$text = [];
|
|
$val = $this->getData(['config', 'i18n', 'langAdmin']);
|
|
switch ($val) {
|
|
case 'fr' :
|
|
$text[0] = 'Retour';
|
|
$text[1] = 'Enregistrer en brouillon';
|
|
$text[2] = 'Publier';
|
|
$text[3] = 'Titre';
|
|
$text[4] = 'Auteur';
|
|
$text[5] = 'Informations générales';
|
|
$text[6] = 'Options de publication';
|
|
$text[7] = 'La news est consultable à partir du moment ou la date de publication est passée.';
|
|
$text[8] = 'Date de publication';
|
|
$text[9] = '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.';
|
|
$text[10] = 'Date de dépublication';
|
|
break;
|
|
case 'en' :
|
|
$text[0] = 'Back';
|
|
$text[1] = 'Save as draft';
|
|
$text[2] = 'Publish';
|
|
$text[3] = 'Title';
|
|
$text[4] = 'Author';
|
|
$text[5] = 'General information';
|
|
$text[6] = 'Publication options';
|
|
$text[7] = 'The news can be consulted as soon as the publication date has passed';
|
|
$text[8] = 'Publication date';
|
|
$text[9] = 'The news is viewable until this date if specified. To cancel the unpublishing date, select a date before publication';
|
|
$text[10] = 'Unpublish date';
|
|
break;
|
|
}
|
|
?>
|
|
<?php echo template::formOpen('newsAddForm'); ?>
|
|
<div class="row">
|
|
<div class="col2">
|
|
<?php echo template::button('newsAddBack', [
|
|
'class' => 'buttonGrey',
|
|
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
|
'ico' => 'left',
|
|
'value' => $text[0]
|
|
]); ?>
|
|
</div>
|
|
<div class="col3 offset5">
|
|
<?php echo template::button('newsAddDraft', [
|
|
'uniqueSubmission' => true,
|
|
'value' => $text[1]
|
|
]); ?>
|
|
<?php echo template::hidden('newsAddState', [
|
|
'value' => true
|
|
]); ?>
|
|
</div>
|
|
<div class="col2">
|
|
<?php echo template::submit('newsAddPublish', [
|
|
'value' => $text[2],
|
|
'uniqueSubmission' => true
|
|
]); ?>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col12">
|
|
<div class="block">
|
|
<h4><?php echo $text[5]; ?></h4>
|
|
<?php echo template::text('newsAddTitle', [
|
|
'label' => $text[3]
|
|
]); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php echo template::textarea('newsAddContent', [
|
|
'class' => 'editorWysiwyg'
|
|
]); ?>
|
|
<div class="row">
|
|
<div class="col12">
|
|
<div class="block">
|
|
<h4><?php echo $text[6]; ?></h4>
|
|
<div class="row">
|
|
<div class="col4">
|
|
<?php echo template::select('newsAddUserId', $module::$users, [
|
|
'label' => $text[4],
|
|
'selected' => $this->getUser('id')
|
|
]); ?>
|
|
</div>
|
|
<div class="col4">
|
|
<?php echo template::date('newsAddPublishedOn', [
|
|
'help' => $text[7],
|
|
'label' => $text[8],
|
|
'value' => time()
|
|
]); ?>
|
|
</div>
|
|
<div class="col4">
|
|
<?php echo template::date('newsAddPublishedOff', [
|
|
'help' => $text[9],
|
|
'label' => $text[10],
|
|
'value' => $this->getData(['module', $this->getUrl(0),'posts', $this->getUrl(2), 'publishedOff'])
|
|
]); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<?php echo template::formClose(); ?>
|