From 1f435b7e1967541f628b1cf7ce7f39e464b8e436 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 10 Sep 2023 09:59:54 +0200 Subject: [PATCH] Shot Title --- core/module/course/course.php | 3 ++- core/module/course/view/add/add.js.php | 20 ++++++++++++++++++++ core/module/course/view/add/add.php | 19 +++++++++++++------ 3 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 core/module/course/view/add/add.js.php diff --git a/core/module/course/course.php b/core/module/course/course.php index f9fae05..60f6644 100644 --- a/core/module/course/course.php +++ b/core/module/course/course.php @@ -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), diff --git a/core/module/course/view/add/add.js.php b/core/module/course/view/add/add.js.php new file mode 100644 index 0000000..bdba684 --- /dev/null +++ b/core/module/course/view/add/add.js.php @@ -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 + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @authorFrédéric Tempez + * @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()); +}); \ No newline at end of file diff --git a/core/module/course/view/add/add.php b/core/module/course/view/add/add.php index 8a19361..f373109 100644 --- a/core/module/course/view/add/add.php +++ b/core/module/course/view/add/add.php @@ -18,14 +18,21 @@
-
+
'Titre' ]); ?>
-
- 'Mentor' +
+
+
+ 'Titre court' + ]); ?> +
+
+ 'Auteur' ]); ?>
@@ -66,7 +73,7 @@ 'label' => 'Clé' ]); ?>
+
- - \ No newline at end of file + \ No newline at end of file