mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Supporting values not in $source in LookupField, instead of displaying "(none)" (which makes it useable in DataDifferencer) (AIR-24)
This commit is contained in:
parent
2ec2c97766
commit
6a98615d18
@ -13,7 +13,6 @@ class LookupField extends DropdownField {
|
||||
* Returns a readonly span containing the correct value.
|
||||
*/
|
||||
function Field() {
|
||||
|
||||
if(trim($this->value) || $this->value === '0') {
|
||||
$this->value = trim($this->value);
|
||||
$source = $this->getSource();
|
||||
@ -24,7 +23,7 @@ class LookupField extends DropdownField {
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($mappedValue)) $mappedValue = "<i>(none)</i>";
|
||||
if(!isset($mappedValue)) $mappedValue = $this->value ? $this->value : "<i>(none)</i>";
|
||||
|
||||
if($this->value) {
|
||||
$val = $this->dontEscape
|
||||
|
Loading…
Reference in New Issue
Block a user