diff --git a/core/modules/translation_entity/translation_entity.admin.inc b/core/modules/translation_entity/translation_entity.admin.inc index 90ba65f..921e6c1 100644 --- a/core/modules/translation_entity/translation_entity.admin.inc +++ b/core/modules/translation_entity/translation_entity.admin.inc @@ -32,7 +32,10 @@ function translation_entity_field_sync_widget(Field $field, FieldInstance $insta $default[$group] = !empty($info['translatable']) ? $group : FALSE; } - $settings = array('dependent_selectors' => array('instance[settings][translation_sync]' => array('file'))); + $settings = array( + 'dependent_selectors' => array('instance[settings][translation_sync]' => array('file')), + 'translation_sync_options' => array_keys($options), + ); $element = array( '#type' => 'checkboxes', diff --git a/core/modules/translation_entity/translation_entity.admin.js b/core/modules/translation_entity/translation_entity.admin.js index e22c3a1..839feae 100644 --- a/core/modules/translation_entity/translation_entity.admin.js +++ b/core/modules/translation_entity/translation_entity.admin.js @@ -107,8 +107,8 @@ Drupal.behaviors.translationEntity = { * Hides translation checkboxes for disabled field values. */ Drupal.behaviors.translationHideDisabled = { - attach: function (context) { - $.each(Drupal.settings.translationEntity.translation_sync, function (index, element) { + attach: function (context, settings) { + $.each(settings.translationEntityDependentOptions.translation_sync_options, function (index, element) { // Get the translatable element checkbox. var $translatableCheckbox = $(':input[name="instance[settings][translation_sync][' + element + ']"][type="checkbox"]'); // Try to guess the checkbox that enables the field.