ZwiiCampus/core/module/course/view/edit/edit.php

94 lines
4.3 KiB
PHP
Raw Normal View History

2023-09-12 22:16:25 +02:00
<?php echo template::formOpen('courseEditForm'); ?>
<div class="row">
<div class="col1">
<?php echo template::button('courseEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'course',
'value' => template::ico('left')
]); ?>
</div>
<div class="col2 offset9">
<?php echo template::submit('courseEditSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Paramètres'); ?>
</h4>
<div class="row">
<div class="col7">
<?php echo template::text('courseEditShortTitle', [
'label' => 'Titre',
'value' => $this->getdata(['course', $this->getUrl(2), 'title'])
2023-09-12 22:16:25 +02:00
]); ?>
</div>
<div class="col5">
<?php echo template::select('courseEditAuthor', $module::$courseTeachers, [
'label' => 'Auteur',
'value' => $this->getdata(['course', $this->getUrl(2), 'author'])
]); ?>
</div>
</div>
2023-09-29 04:28:17 +02:00
<div class="row">
2023-09-30 13:35:20 +02:00
<div class="col6">
<?php echo template::select('courseEditHomePageId', helper::arrayColumn($module::$pagesList, 'title', 'SORT_ASC'), [
2023-11-15 18:06:49 +01:00
'label' => 'Accueil du contenu',
2023-09-30 13:35:20 +02:00
'selected' => $this->getdata(['course', $this->getUrl(2), 'homePageId']),
]); ?>
</div>
<div class="col6">
2023-10-28 23:18:07 +02:00
<?php echo template::select('courseEditCategorie', $module::$courseCategories, [
2023-09-29 04:28:17 +02:00
'label' => 'Catégorie',
2023-10-28 23:18:07 +02:00
'selected' => $this->getdata(['course', $this->getUrl(2), 'category'])
2023-09-29 04:28:17 +02:00
]); ?>
</div>
</div>
2023-09-12 22:16:25 +02:00
<div class="row">
<div class="col12">
<?php echo template::textarea('courseEditDescription', [
'label' => 'Description',
'value' => $this->getdata(['course', $this->getUrl(2), 'description'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('courseEditAccess', $module::$courseAccess, [
2023-10-19 13:47:36 +02:00
'label' => 'Disponibilité',
2023-09-12 22:16:25 +02:00
'selected' => $this->getdata(['course', $this->getUrl(2), 'access'])
]); ?>
</div>
<div class="col4">
<?php echo template::date('courseOpeningDate', [
'type' => 'datetime-local',
'label' => 'Ouverture',
2023-09-30 13:35:20 +02:00
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'openingDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'openingDate']) / 60) * 60
2023-09-12 22:16:25 +02:00
]); ?>
</div>
<div class="col4">
<?php echo template::date('courseClosingDate', [
'type' => 'datetime-local',
'label' => 'Fermeture',
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'closingDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'closingDate']) / 60) * 60
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::select('courseEditEnrolment', $module::$courseEnrolment, [
'label' => 'Inscription',
'selected' => $this->getdata(['course', $this->getUrl(2), 'enrolment'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('courseEditEnrolmentKey', [
'label' => 'Clé',
'value' => $this->getdata(['course', $this->getUrl(2), 'enrolmentKey'])
]); ?>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>