Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15516989
D18878.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18878.diff
View Options
diff --git a/src/applications/transactions/bulk/type/BulkSelectParameterType.php b/src/applications/transactions/bulk/type/BulkSelectParameterType.php
--- a/src/applications/transactions/bulk/type/BulkSelectParameterType.php
+++ b/src/applications/transactions/bulk/type/BulkSelectParameterType.php
@@ -3,8 +3,15 @@
final class BulkSelectParameterType
extends BulkParameterType {
+ private $options;
+
+ public function setOptions(array $options) {
+ $this->options = $options;
+ return $this;
+ }
+
public function getOptions() {
- return $this->getField()->getOptions();
+ return $this->options;
}
public function getPHUIXControlType() {
diff --git a/src/applications/transactions/editfield/PhabricatorSelectEditField.php b/src/applications/transactions/editfield/PhabricatorSelectEditField.php
--- a/src/applications/transactions/editfield/PhabricatorSelectEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorSelectEditField.php
@@ -55,7 +55,8 @@
}
protected function newBulkParameterType() {
- return new BulkSelectParameterType();
+ return id(new BulkSelectParameterType())
+ ->setOptions($this->getOptions());
}
private function getCanonicalValue($value) {
diff --git a/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php b/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
--- a/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
+++ b/src/applications/transactions/engineextension/PhabricatorSubtypeEditEngineExtension.php
@@ -30,6 +30,9 @@
$subtype_type = PhabricatorTransactions::TYPE_SUBTYPE;
+ $map = $object->newEditEngineSubtypeMap();
+ $options = mpull($map, 'getName');
+
$subtype_field = id(new PhabricatorSelectEditField())
->setKey(self::EDITKEY)
->setLabel(pht('Subtype'))
@@ -41,7 +44,8 @@
->setTransactionType($subtype_type)
->setConduitDescription(pht('Change the object subtype.'))
->setConduitTypeDescription(pht('New object subtype key.'))
- ->setValue($object->getEditEngineSubtype());
+ ->setValue($object->getEditEngineSubtype())
+ ->setOptions($options);
return array(
$subtype_field,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 19, 10:52 PM (6 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383113
Default Alt Text
D18878.diff (2 KB)
Attached To
Mode
D18878: Make bulk edit <select /> fields a little more natrual and set options for subtype transactions
Attached
Detach File
Event Timeline
Log In to Comment