+ // Displayed the "shared fields widgets" toggle.
+ if ($content_translation_manager instanceof BundleTranslationSettingsInterface) {
+ $settings = $content_translation_manager->getBundleTranslationSettings($entity_type_id, $bundle);
+ $force_hidden = ContentTranslationManager::isPendingRevisionSupportEnabled($entity_type_id, $bundle);
+ $form['settings'][$entity_type_id][$bundle]['settings']['content_translation']['untranslatable_fields_hide'] = [
+ '#type' => 'checkbox',
+ '#title' => t('Hide non translatable fields on translation forms'),
+ '#default_value' => $force_hidden || !empty($settings['untranslatable_fields_hide']),
+ '#disabled' => $force_hidden,
+ '#description' => $force_hidden ? t('Moderated content requires non-translatable fields to be edited in the original language form.') : '',
+ '#states' => [
+ 'visible' => [
+ ':input[name="settings[' . $entity_type_id . '][' . $bundle . '][translatable]"]' => [
+ 'checked' => TRUE,
+ ],
+ ],
+ ],
+ ];
+ }
+