mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Fixed readonly version of TreeMultiselectField
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@78471 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
74c89fced4
commit
d34def6b47
@ -85,6 +85,12 @@ HTML;
|
|||||||
* Changes this field to the readonly field.
|
* Changes this field to the readonly field.
|
||||||
*/
|
*/
|
||||||
function performReadonlyTransformation() {
|
function performReadonlyTransformation() {
|
||||||
|
return new TreeMultiselectField_Readonly($this->name, $this->title, $this->sourceObject, $this->keyField, $this->labelField);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TreeMultiselectField_Readonly extends TreeMultiselectField {
|
||||||
|
function Field() {
|
||||||
$titleArray = array();
|
$titleArray = array();
|
||||||
$titleList = array();
|
$titleList = array();
|
||||||
if($items = $this->getItems()) {
|
if($items = $this->getItems()) {
|
||||||
@ -95,6 +101,6 @@ HTML;
|
|||||||
$field = new ReadonlyField($this->name, $this->title);
|
$field = new ReadonlyField($this->name, $this->title);
|
||||||
$field->setValue($titleList);
|
$field->setValue($titleList);
|
||||||
$field->setForm($this->form);
|
$field->setForm($this->form);
|
||||||
return $field;
|
return $field->Field();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user