From 986e2e33e00a68812113b8653d83b1944e2f5d31 Mon Sep 17 00:00:00 2001 From: daitingting Date: Mon, 19 Jun 2023 07:09:53 +0000 Subject: [PATCH] * Adjust the header and the submit for start action. --- module/testtask/control.php | 3 +-- module/testtask/model.php | 2 +- module/testtask/ui/start.html.php | 18 +++++++++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/module/testtask/control.php b/module/testtask/control.php index 7e4e50103c..b816269e8c 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -863,8 +863,7 @@ class testtask extends control $message = $this->executeHooks($taskID); if($message) $this->lang->saveSuccess = $message; - if(isonlybody()) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); - return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('testtask', 'view', "taskID=$taskID"))); + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true, 'closeModal' => true)); } /* Get task info. */ diff --git a/module/testtask/model.php b/module/testtask/model.php index ea6db689bd..0f48478a05 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -827,7 +827,7 @@ class testtaskModel extends model $oldTesttask = $this->getById($taskID); $testtask = fixer::input('post') ->add('id', $taskID) - ->setDefault('status', 'doing') + ->add('status', 'doing') ->stripTags($this->config->testtask->editor->start['id'], $this->config->allowedTags) ->remove('comment')->get(); diff --git a/module/testtask/ui/start.html.php b/module/testtask/ui/start.html.php index 270325a5f7..2632a305a5 100644 --- a/module/testtask/ui/start.html.php +++ b/module/testtask/ui/start.html.php @@ -11,16 +11,20 @@ declare(strict_types=1); namespace zin; set::title($testtask->name); +to::header +( + $lang->testtask->startAction, + entityLabel + ( + set::entityID($testtask->id), + set::level(1), + set::text($testtask->name), + set::reverse(true), + ) +); form ( - formGroup - ( - set::label($lang->testtask->status), - set::name('status'), - set::value('doing'), - set::class('hidden'), - ), formGroup ( set::label($lang->comment),