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:
@@ -124,10 +124,14 @@ abstract class DifferentialRevisionActionTransaction
|
|||||||
list($options, $value) = $this->getActionOptions($viewer, $revision);
|
list($options, $value) = $this->getActionOptions($viewer, $revision);
|
||||||
|
|
||||||
// Show the options if the user can select on behalf of two or more
|
// 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_multi = (count($options) > 1);
|
||||||
$can_force = (count($value) < count($options));
|
$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->setOptions($options);
|
||||||
$field->setValue($value);
|
$field->setValue($value);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user