From b34e312e867d6d421cd6bd5b836c10b73fac7ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Fri, 30 Dec 2022 14:18:28 +0800 Subject: [PATCH] * Fix bug #31353. --- module/execution/view/create.html.php | 8 +++++++- module/execution/view/edit.html.php | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/module/execution/view/create.html.php b/module/execution/view/create.html.php index 87b0986e9f..8b8924cb7c 100644 --- a/module/execution/view/create.html.php +++ b/module/execution/view/create.html.php @@ -143,7 +143,9 @@ type != 'normal' and isset($branchGroups[$product->id]);?>
'> product->common;?> - id, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> + model == 'waterfall' and !$project->division) ? "disabled='disabled'" : '';?> + id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> + model == 'waterfall' and !$project->division) echo html::hidden("products[$i]", $product->id);?>
'> @@ -159,10 +161,12 @@
> product->plan;?> id][]", isset($productPlans[$product->id]) ? $productPlans[$product->id] : array(), isset($product->plans) ? $product->plans : '', "class='form-control chosen' multiple");?> + model == 'waterfall' and !$project->division)):?>
>
+
@@ -195,10 +199,12 @@
product->plan;?> + model == 'waterfall' and $project->division)):?>
+
diff --git a/module/execution/view/edit.html.php b/module/execution/view/edit.html.php index f2eaf83b23..54e94e7377 100644 --- a/module/execution/view/edit.html.php +++ b/module/execution/view/edit.html.php @@ -154,7 +154,9 @@ type != 'normal' and isset($branchGroups[$product->id]);?>
'> product->common;?> - id, "class='form-control chosen' onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> + type == 'stage' and !$execution->division) ? "disabled='disabled'" : '';?> + id, "class='form-control chosen' $disabled onchange='loadBranches(this)' data-last='" . $product->id . "' data-type='" . $product->type . "'");?> + type == 'stage' and !$execution->division) echo html::hidden("products[$i]", $product->id);?>
'> @@ -170,10 +172,12 @@
> product->plan;?> id][]", isset($productPlans[$product->id]) ? $productPlans[$product->id] : array(), $product->plans, "class='form-control chosen' multiple");?> + type == 'stage' and !$execution->division)):?>
>
+