From 29a16f691f3d2450fe34cc879eb11e6e56262b46 Mon Sep 17 00:00:00 2001 From: Franco Springveldt Date: Fri, 22 Sep 2017 15:29:56 +1200 Subject: [PATCH] FIX make translatable field readonly if ->isReadOnly() --- code/model/Translatable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/model/Translatable.php b/code/model/Translatable.php index 8f04b2b..3f1fe18 100755 --- a/code/model/Translatable.php +++ b/code/model/Translatable.php @@ -1212,7 +1212,7 @@ class Translatable extends DataExtension implements PermissionProvider { if(in_array($dataField->getName(), $translatableFieldNames)) { // if the field is translatable, perform transformation $fields->replaceField($dataField->getName(), $transformation->transformFormField($dataField)); - } elseif(!$dataField->isReadonly()) { + } elseif($dataField->isReadonly()) { // else field shouldn't be editable in translation-mode, make readonly $fields->replaceField($dataField->getName(), $dataField->performReadonlyTransformation()); }