From 40cd3ecb401562d82156815395c1573efdadb5aa Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 23 Apr 2024 16:43:13 +0800 Subject: [PATCH] * Fix bug #45092. --- module/todo/js/batchcreate.ui.js | 10 +++++++++- module/todo/ui/batchcreate.html.php | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/module/todo/js/batchcreate.ui.js b/module/todo/js/batchcreate.ui.js index bc353f0eb3..75b28f6a48 100644 --- a/module/todo/js/batchcreate.ui.js +++ b/module/todo/js/batchcreate.ui.js @@ -34,7 +34,7 @@ window.changeType = function(e) } } -window.changFuture = function() +window.changeFuture = function() { const isChecked = $('#futureDate[type="checkbox"]').prop('checked'); const $todoDate = $('#todoDate').zui('datePicker'); @@ -106,3 +106,11 @@ window.initTime = function(e) } }); } + +window.togglePending = function(e) +{ + $(e.target).closest('.input-group').find('.time-input').each(function() + { + $(this).zui('picker').render({disabled: e.target.checked}); + }); +} diff --git a/module/todo/ui/batchcreate.html.php b/module/todo/ui/batchcreate.html.php index 309b22863b..93aeb040bb 100644 --- a/module/todo/ui/batchcreate.html.php +++ b/module/todo/ui/batchcreate.html.php @@ -40,7 +40,7 @@ formBatchPanel on::change('[data-name="type"]', 'changeType'), on::change('.time-input', 'initTime'), - on::click('.time-check', "window.changFuture"), + on::click('.time-check', "window.togglePending"), on::click('.form-batch-row-actions .btn', 'initTime'), to::heading @@ -72,6 +72,7 @@ formBatchPanel setID('futureDate'), set::name('futureDate'), $lang->todo->periods['future'], + on::click('window.changeFuture') ) ) )