mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
Fixing ::transformCheckboxField()
Argument 1 passed to Translatable_Transformation::transformCheckboxField() should be an instance of CheckboxField_Readonly. As mentioned in the docblock, the first Argument is the readonly field to contain the original value.
This commit is contained in:
parent
7342850139
commit
14c103d0ab
@ -1860,7 +1860,7 @@ class Translatable_Transformation extends FormTransformation {
|
|||||||
* @param FormField $originalField The original editable field containing the translated value
|
* @param FormField $originalField The original editable field containing the translated value
|
||||||
* @return CheckboxField The field with a modified label
|
* @return CheckboxField The field with a modified label
|
||||||
*/
|
*/
|
||||||
protected function transformCheckboxField(CheckboxField $nonEditableField, CheckboxField $originalField) {
|
protected function transformCheckboxField(CheckboxField_Readonly $nonEditableField, CheckboxField $originalField) {
|
||||||
$label = $originalField->Title();
|
$label = $originalField->Title();
|
||||||
$fieldName = $originalField->getName();
|
$fieldName = $originalField->getName();
|
||||||
$value = ($this->original->$fieldName)
|
$value = ($this->original->$fieldName)
|
||||||
|
Loading…
Reference in New Issue
Block a user