From 648c6621a66ffba386a340bfa67bd622d9db562a Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 7 Jul 2023 19:42:55 +0800 Subject: [PATCH] * Change form header style. --- module/todo/js/batchcreate.ui.js | 14 ++++++++++++++ module/todo/ui/batchcreate.html.php | 28 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/module/todo/js/batchcreate.ui.js b/module/todo/js/batchcreate.ui.js index e69de29bb2..76271e0a33 100644 --- a/module/todo/js/batchcreate.ui.js +++ b/module/todo/js/batchcreate.ui.js @@ -0,0 +1,14 @@ +window.renderRowData = function($row, index, row) +{ + if($row.find('td[data-name="beginAndEnd"] .inited').length == 0) + { + $tdDom = $row.find('td[data-name="beginAndEnd"]'); + $tdDom.empty().html($('#dateCellData').html()); + + $tdDom.find('input[name="begin"]').attr('name', `begin[${index}]`); + $tdDom.find('input[name="end"]').attr('name', `end[${index}]`); + + $tdDom.find('input[name="switchTime"]').attr('name', `switchTime[${index}]`).attr('id', `switchTime_${index}`); + $tdDom.find('label[for="switchTime_"]').attr('for', `switchTime_${index}`); + } +} diff --git a/module/todo/ui/batchcreate.html.php b/module/todo/ui/batchcreate.html.php index da4f5c904f..e3331978af 100644 --- a/module/todo/ui/batchcreate.html.php +++ b/module/todo/ui/batchcreate.html.php @@ -54,9 +54,37 @@ foreach(explode(',', $showFields) as $field) formBatchPanel ( set::id('batchCreateTodoForm'), + set::title($lang->todo->batchCreate . $lang->todo->common), set::url(createLink('todo', 'batchEdit', "from=todoBatchEdit&type={$type}&userID={$userID}&status={$status}")), on::change('[data-name="type"]', 'setNameCell'), on::click('.time-check', "$(event.target).closest('.input-group').find('.time-input').prop('disabled', !!event.target.checked)"), + set::headingClass('justify-start'), + to::headingActions + ( + inputGroup + ( + span + ( + setClass('input-group-addon'), + $lang->todo->date + ), + input + ( + set::type('date'), + set::name('date'), + set::value($date), + ), + span + ( + setClass('input-group-addon'), + checkBox + ( + set::name('switchTime'), + $lang->todo->periods['future'], + ) + ), + ), + ), formBatchItem ( set::name('id'),