Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14387322
D18142.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18142.diff
View Options
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
@@ -27,18 +27,13 @@
return $this->optionAliases;
}
+ protected function getDefaultValueFromConfiguration($value) {
+ return $this->getCanonicalValue($value);
+ }
+
protected function getValueForControl() {
$value = parent::getValueForControl();
-
- $options = $this->getOptions();
- if (!isset($options[$value])) {
- $aliases = $this->getOptionAliases();
- if (isset($aliases[$value])) {
- $value = $aliases[$value];
- }
- }
-
- return $value;
+ return $this->getCanonicalValue($value);
}
protected function newControl() {
@@ -59,4 +54,16 @@
return new ConduitStringParameterType();
}
+ private function getCanonicalValue($value) {
+ $options = $this->getOptions();
+ if (!isset($options[$value])) {
+ $aliases = $this->getOptionAliases();
+ if (isset($aliases[$value])) {
+ $value = $aliases[$value];
+ }
+ }
+
+ return $value;
+ }
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 2:36 PM (5 h, 24 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6918579
Default Alt Text
D18142.diff (1 KB)
Attached To
Mode
D18142: Let "<select />" EditEngine fields canonicalize saved defaults
Attached
Detach File
Event Timeline
Log In to Comment