From 72d1f005c58a66fe5d76612fc8ba6434a5306de9 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 12 Feb 2025 10:58:51 +0800 Subject: [PATCH] * [bug#59577,done,0.2h] remove delete button. --- module/bug/ui/batchcreate.html.php | 2 +- module/bug/ui/common.field.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/bug/ui/batchcreate.html.php b/module/bug/ui/batchcreate.html.php index 780f500480..1906819900 100644 --- a/module/bug/ui/batchcreate.html.php +++ b/module/bug/ui/batchcreate.html.php @@ -45,7 +45,7 @@ if($product->type != 'normal') $items[] = array('name' => 'branch', 'label' => $ $items[] = array('name' => 'module', 'label' => $lang->bug->module, 'control' => 'picker', 'items' => $moduleOptionMenu, 'value' => $moduleID, 'width' => '200px', 'required' => isset($requiredFields['module']), 'ditto' => true); /* Field of project. */ -$items[] = array('name' => 'project', 'label' => $lang->bug->project, 'control' => 'picker', 'items' => $projects, 'value' => $projectID, 'width' => '200px', 'required' => isset($requiredFields['project']), 'ditto' => true); +$items[] = array('name' => 'project', 'label' => $lang->bug->project, 'control' => array('control' => 'picker', 'required' => !empty($product->shadow)), 'items' => $projects, 'value' => $projectID, 'width' => '200px', 'required' => isset($requiredFields['project']), 'ditto' => true); /* Field of execution. */ $items[] = array diff --git a/module/bug/ui/common.field.php b/module/bug/ui/common.field.php index eca4ebf0a3..548b4facec 100644 --- a/module/bug/ui/common.field.php +++ b/module/bug/ui/common.field.php @@ -12,7 +12,7 @@ $fields->field('product') ->item((data('product.type') !== 'normal' && isset(data('products')[data('bug.productID')])) ? field('branch')->control('picker')->required(true)->boxClass('flex-none')->width('100px')->name('branch')->items(data('branches'))->value(data('bug.branch')) : null); $fields->field('project') - ->control('picker') + ->control(array('control' => 'picker', 'required' => !empty(data('product.shadow')))) ->items(data('projects')) ->value(data('projectID'));