source as $key => $value) {
$itemID = $this->id() . "_" . ereg_replace('[^a-zA-Z0-9]+','',$key);
if($key == $this->value/* || $useValue */) {
$useValue = false;
$checked = " checked=\"checked\"";
} else {
$checked="";
}
$odd = ($odd + 1) % 2;
$extraClass = $odd ? "odd" : "even";
$extraClass .= " val" . preg_replace('/[^a-zA-Z0-9\-\_]/','_', $key);
$disabled = $this->disabled ? 'disabled="disabled"' : '';
$options .= "
\n";
}
$id = $this->id();
return "extraClass()}\">\n$options
\n";
}
protected $disabled = false;
function setDisabled($val) {
$this->disabled = $val;
}
function performReadonlyTransformation() {
// Source and values are DataObject sets.
$items = $this->source;
$field = new LookupField($this->name,$this->title ? $this->title : "" ,$items,$this->value);
$field->setForm($this->form);
return $field;
}
function ExtraOptions() {
return new DataObjectSet();
}
}
?>