diff --git a/module/execution/ui/close.html.php b/module/execution/ui/close.html.php index c4c1f9a569..e91f188b8b 100644 --- a/module/execution/ui/close.html.php +++ b/module/execution/ui/close.html.php @@ -14,6 +14,11 @@ $confirmTip = !empty($unclosedTasks) ? sprintf($this->lang->execution->confirm $confirmURL = $this->createLink('execution', 'close', "executionID={$executionID}&from={$from}"); $beforeSubmit = jsRaw("() => { + let realBegan = '{$execution->realBegan}'; + let realEnd = $('[name=realEnd]').val(); + let today = zui.formatDate(zui.createDate(), 'yyyy-MM-dd'); + if(realBegan >= realEnd || realEnd >= today) return true; + zui.Modal.confirm('{$confirmTip}').then((res) => { if(res)