diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc index 26482cd..f72da8b 100644 --- a/core/modules/content_translation/content_translation.admin.inc +++ b/core/modules/content_translation/content_translation.admin.inc @@ -53,6 +53,13 @@ function content_translation_field_sync_widget(Field $field, FieldInstance $inst ), ), ); + // Check if the Title and Alt may be translated and move the form element + // after these ones. + if (array_key_exists('title', $element['#default_value']) && array_key_exists('alt', $element['#default_value'])) { + // Special case for image fields. Move the Translatable elements towards + // the bottom, after the enable/disable controls. + $element['#weight'] = 13; + } } return $element; diff --git a/core/modules/content_translation/content_translation.admin.js b/core/modules/content_translation/content_translation.admin.js index f1a4870..3fc705a 100644 --- a/core/modules/content_translation/content_translation.admin.js +++ b/core/modules/content_translation/content_translation.admin.js @@ -108,7 +108,7 @@ Drupal.behaviors.contentTranslation = { */ Drupal.behaviors.translationHideDisabled = { attach: function (context, settings) { - $.each(settings.translationEntityDependentOptions.translation_sync_options, function (index, element) { + $.each(settings.contentTranslationDependentOptions.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.