mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
When reviewing, always show "Accept" checkboxes for packages/projects, even if there's only one checkbox
Summary: Fixes T12533. Test Plan: {F4853371} Reviewers: chad, lvital Reviewed By: lvital Maniphest Tasks: T12533 Differential Revision: https://secure.phabricator.com/D17652
This commit is contained in:
parent
5cf53f7b3b
commit
26d6096e0a
1 changed files with 6 additions and 2 deletions
|
@ -124,10 +124,14 @@ abstract class DifferentialRevisionActionTransaction
|
|||
list($options, $value) = $this->getActionOptions($viewer, $revision);
|
||||
|
||||
// Show the options if the user can select on behalf of two or more
|
||||
// reviewers, or can force-accept on behalf of one or more reviewers.
|
||||
// reviewers, or can force-accept on behalf of one or more reviewers,
|
||||
// or can accept on behalf of a reviewer other than themselves (see
|
||||
// T12533).
|
||||
$can_multi = (count($options) > 1);
|
||||
$can_force = (count($value) < count($options));
|
||||
if ($can_multi || $can_force) {
|
||||
$not_self = (head_key($options) != $viewer->getPHID());
|
||||
|
||||
if ($can_multi || $can_force || $not_self) {
|
||||
$field->setOptions($options);
|
||||
$field->setValue($value);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue