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

110 lines
5.2 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',
2024-01-14 19:30:14 +01:00
'href' => helper::baseUrl() . 'course/manage/' . $this->getUrl(2),
2023-09-12 22:16:25 +02:00
'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',
2024-01-21 11:18:05 +01:00
'selected' => $this->getdata(['course', $this->getUrl(2), 'author'])
2023-09-12 22:16:25 +02:00
]); ?>
</div>
</div>
2023-09-29 04:28:17 +02:00
<div class="row">
2023-09-30 13:35:20 +02:00
<div class="col6">
2024-09-03 21:38:12 +02:00
<?php echo template::select('courseEditHomePageId', helper::arrayColumn($module::$pagesList, 'title'), [
2023-12-07 10:40:47 +01:00
'label' => 'Page d\'accueil',
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">
2023-11-18 16:14:19 +01:00
<div class="col4">
2023-09-12 22:16:25 +02:00
<?php echo template::select('courseEditEnrolment', $module::$courseEnrolment, [
2023-12-06 13:46:31 +01:00
'label' => 'Participation',
2023-09-12 22:16:25 +02:00
'selected' => $this->getdata(['course', $this->getUrl(2), 'enrolment'])
]); ?>
</div>
2023-11-18 16:14:19 +01:00
<div class="col4">
2023-09-12 22:16:25 +02:00
<?php echo template::text('courseEditEnrolmentKey', [
'label' => 'Clé',
'value' => $this->getdata(['course', $this->getUrl(2), 'enrolmentKey'])
]); ?>
</div>
</div>
2023-11-18 16:14:19 +01:00
<div class="row">
<div class="col4">
<?php echo template::checkbox('courseEditEnrolmentLimit', true, 'Date de fin d\'inscription', [
'checked' => $this->getdata(['course', $this->getUrl(2), 'limitEnrolment']),
'help' => 'Ne s\'applique pas à l\'inscription anonyme',
]); ?>
</div>
<div class="col4">
<?php echo template::date('courseEditEnrolmentLimitDate', [
'type' => 'datetime-local',
'label' => 'Fermeture',
'value' => is_null($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate'])) ? '' : floor($this->getdata(['course', $this->getUrl(2), 'limitEnrolmentDate']) / 60) * 60
]); ?>
</div>
</div>
2023-09-12 22:16:25 +02:00
</div>
</div>
</div>
<?php echo template::formClose(); ?>