From b00c0954f639abef6128a5646fe962b5c36433a4 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 12 Oct 2023 19:18:29 +0200 Subject: [PATCH] user filter auto submit v35 --- core/core.php | 2 +- core/module/course/view/user/user.js.php | 28 ++++++++++++++---------- core/module/course/view/user/user.php | 6 ----- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/core/core.php b/core/core.php index 55489d9..b9f47a0 100644 --- a/core/core.php +++ b/core/core.php @@ -50,7 +50,7 @@ class common const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '1.0.34'; + const ZWII_VERSION = '1.0.35'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/lms/'; diff --git a/core/module/course/view/user/user.js.php b/core/module/course/view/user/user.js.php index 09ce1a7..a1ca4a4 100644 --- a/core/module/course/view/user/user.js.php +++ b/core/module/course/view/user/user.js.php @@ -10,15 +10,21 @@ * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International * @link http://zwiicms.fr/ */ -(".userDelete").on("click", (function() { - var _this = $(this); - return message = "", core.confirm(message, (function() { - $(location).attr("href", _this.attr("href")) - })) -})); -(".userDeleteAll").on("click", (function() { - var _this = $(this); - return message = "", core.confirm(message, (function() { - $(location).attr("href", _this.attr("href")) - })) + +$(document).ready((function () { + (".userDelete").on("click", (function () { + var _this = $(this); + return message = "", core.confirm(message, (function () { + $(location).attr("href", _this.attr("href")) + })) + })); + (".userDeleteAll").on("click", (function () { + var _this = $(this); + return message = "", core.confirm(message, (function () { + $(location).attr("href", _this.attr("href")) + })) + })); + $("#userFilterGroup, #userFilterFirstName, #userFilterLastName").change(function () { + $("#userFilterUserForm").submit(); + }); })); \ No newline at end of file diff --git a/core/module/course/view/user/user.php b/core/module/course/view/user/user.php index 2f38cfa..970223d 100644 --- a/core/module/course/view/user/user.php +++ b/core/module/course/view/user/user.php @@ -43,12 +43,6 @@ 'selected' => isset($_POST['courseFilterLastName']) ? $_POST['courseFilterLastName'] : 'all', ]); ?> -
- 'Filtrer', - 'uniqueSubmission' => true - ]); ?> -