mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
FIX make translatable field readonly if ->isReadOnly()
This commit is contained in:
parent
044971c6cf
commit
29a16f691f
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user