From 966366a92fb0abe9f70e2fc5994aeb49fd19e5fc Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Sat, 29 Apr 2023 22:07:20 +0200 Subject: [PATCH] fix submit conditions --- js/backend.js | 7 ++++--- src/Manage.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/js/backend.js b/js/backend.js index c74be5a..7d18d76 100644 --- a/js/backend.js +++ b/js/backend.js @@ -1,16 +1,17 @@ /*global $, dotclear */ 'use strict'; -Object.assign(dotclear.msg, dotclear.getData('dclog_list')); +Object.assign(dotclear.msg, dotclear.getData('dcLog_msg')); $(function(){ $('.checkboxes-helpers').each(function(){ dotclear.checkboxesHelpers(this) }); - $('input[name="del_logs"]').click(function(){ + $('input[name="selected_logs"]').click(function(){ return window.confirm(dotclear.msg.confirm_delete_selected_log) }); - $('input[name="del_all_logs"]').click(function(){ + $('input[name="all_logs"]').click(function(){ return window.confirm(dotclear.msg.confirm_delete_all_log) }) + dotclear.condSubmit('#dcLog_form td input[type=checkbox]', '#dcLog_form #selected_logs'); }) \ No newline at end of file diff --git a/src/Manage.php b/src/Manage.php index 026fe2a..db19ac1 100644 --- a/src/Manage.php +++ b/src/Manage.php @@ -77,8 +77,8 @@ class Manage extends dcNsProcess $current = ManageVars::init(); dcPage::openModule( - __('Pings'), - dcPage::jsJson('dclog_list', [ + My::name(), + dcPage::jsJson('dcLog_msg', [ 'confirm_delete_selected_log' => __('Are you sure you want to delete selected logs?'), 'confirm_delete_all_log' => __('Are you sure you want to delete all logs?'), ]) .