mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUG corrects MoneyField::setReadonly() method in order to return ReadonlyField instances of its child fields
Issue #2766 - This causes our cloned MoneyField to actually contain two ReadonlyFields for currency and amount.
This commit is contained in:
parent
6fae1e6392
commit
611d571b65
@ -131,8 +131,8 @@ class MoneyField extends FormField {
|
||||
public function setReadonly($bool) {
|
||||
parent::setReadonly($bool);
|
||||
|
||||
$this->fieldAmount->setReadonly($bool);
|
||||
$this->fieldCurrency->setReadonly($bool);
|
||||
$this->fieldAmount = $this->fieldAmount->performReadonlyTransformation();
|
||||
$this->fieldCurrency = $this->fieldCurrency->performReadonlyTransformation();
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user