From 6dc4aeb45887732dfe664bfc229d09c46ea2ef09 Mon Sep 17 00:00:00 2001 From: zenggang Date: Tue, 30 Nov 2021 05:59:03 +0000 Subject: [PATCH] * Fix bug#16774 --- module/mr/view/view.html.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/mr/view/view.html.php b/module/mr/view/view.html.php index 9045d38b31..6c623259e2 100644 --- a/module/mr/view/view.html.php +++ b/module/mr/view/view.html.php @@ -102,14 +102,15 @@
- state == 'opened' and !$rawMR->has_conflicts) echo html::a(inlink('accept', "mr=$MR->id", '', true), ' ' . $lang->mr->acceptMR, '', "id='mergeButton' class='btn'" . ($MR->approvalStatus == 'approved' ? '' :' disabled')); ?> + approvalStatus != 'approved' or ($MR->compileID !=0 and $MR->compileStatus != 'success')) ? ' disabled' : ''; ?> + state == 'opened' and !$rawMR->has_conflicts) echo html::a(inlink('accept', "mr=$MR->id", '', true), ' ' . $lang->mr->acceptMR, '', "id='mergeButton' class='btn' $acceptDisabled"); ?> state == 'opened'): ?> - has_conflicts or ($MR->compileID !=0 and $MR->compileStatus != 'success')):?> + has_conflicts or ($MR->compileID !=0 and $MR->compileStatus != 'success') or $MR->approvalStatus == 'approved'):?> id&action=approve", '', true), ' ' . $lang->mr->approve, '', "id='mergeButton' class='btn iframe showinonlybody' disabled"); ?> id&action=approve", '', true), ' ' . $lang->mr->approve, '', "id='mergeButton' class='btn iframe showinonlybody'"); ?> - id&action=reject", '', true), ' ' . $lang->mr->reject, '', "id='mergeButton' class='btn iframe showinonlybody'"); ?> + id&action=reject", '', true), ' ' . $lang->mr->reject, '', "id='mergeButton' class='btn iframe showinonlybody'" . ($MR->approvalStatus == 'rejected' ? 'disabled' : '')); ?> id"), ' ' . $lang->mr->close, '', "id='mergeButton' class='btn'"); ?> id"), ' ' . str_replace($lang->mr->common, '', $lang->mr->edit), '', "id='mergeButton' class='btn'"); ?>