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:
Ingo Schommer 2011-08-29 22:33:57 +02:00
parent 2ec2c97766
commit 6a98615d18

View File

@ -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