Permalink
Browse files

ENHANCEMENT Supporting values not in $source in LookupField, instead …

…of displaying "(none)" (which makes it useable in DataDifferencer) (AIR-24)
  • Loading branch information...
1 parent 2ec2c97 commit 6a98615d18bbb265b1becf96dc407ae2c9a299dc @chillu chillu committed Aug 29, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 forms/LookupField.php
View
@@ -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 @@ function Field() {
}
}
- if(!isset($mappedValue)) $mappedValue = "<i>(none)</i>";
+ if(!isset($mappedValue)) $mappedValue = $this->value ? $this->value : "<i>(none)</i>";
if($this->value) {
$val = $this->dontEscape

0 comments on commit 6a98615

Please sign in to comment.