Shot Title

This commit is contained in:
Fred Tempez 2023-09-10 09:59:54 +02:00
parent 65b39f116f
commit 1f435b7e19
3 changed files with 35 additions and 7 deletions

View File

@ -58,7 +58,8 @@ class course extends common
uniqid(),
[
'title' => $this->getInput('courseAddTitle',helper::FILTER_STRING_SHORT, true),
'mentor' => $this->getInput('courseAddMentor'),
'shortTitle' => $this->getInput('courseAddShortTitle',helper::FILTER_STRING_SHORT, true),
'author' => $this->getInput('courseAddAuthor'),
'description' => $this->getInput('courseAddDescription', helper::FILTER_STRING_SHORT, true),
'access' => $this->getInput('courseAddAccess'),
'openingDate' => $this->getInput('courseOpeningDate', helper::FILTER_DATETIME),

View File

@ -0,0 +1,20 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @authorFrédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2023, Frédéric Tempez
* @license CC Attribution-NonCommercial-NoDerivatives 4.0 International
* @link http://zwiicms.fr/
*/
/**
* Duplication du champ Title dans Short title
*/
$("#courseAddTitle").on("input", function() {
$("#courseAddShortTitle").val($(this).val());
});

View File

@ -18,14 +18,21 @@
<?php echo helper::translate('Paramètres'); ?>
</h4>
<div class="row">
<div class="col8">
<div class="col12">
<?php echo template::text('courseAddTitle', [
'label' => 'Titre'
]); ?>
</div>
<div class="col4">
<?php echo template::select('courseAddAccess', $module::$courseTeachers, [
'label' => 'Mentor'
</div>
<div class="row">
<div class="col7">
<?php echo template::text('courseAddShortTitle', [
'label' => 'Titre court'
]); ?>
</div>
<div class="col5">
<?php echo template::select('courseAddAuthor', $module::$courseTeachers, [
'label' => 'Auteur'
]); ?>
</div>
</div>
@ -68,5 +75,5 @@
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
</div>
<?php echo template::formClose(); ?>