Commit 16bcc3ab authored by Joseph Olstad's avatar Joseph Olstad
Browse files

Issue #3284345 by joseph.olstad: Regression fix for change made on commit...

Issue #3284345 by joseph.olstad: Regression fix for change made on commit cbea8496 Enabling a content type with etuf can throw an undefined index line 168 of entity_translation_unified_form.module
parent b1e5dde4
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -147,8 +147,12 @@ function entity_translation_unified_form_form_node_type_form_process(&$form, $fo
  $form['workflow']['entity_translation_unified_form']['entity_translation_unified_form_translate_labels'] = [
    '#title' => t('Translate fields labels and descriptions in each language'),
    '#type' => 'checkbox',
    '#default_value' => entity_translation_unified_form_translate_labels_enabled($entity_type_id, $bundle),
    '#states' => [
    '#default_value' => FALSE,
    '#states' => $states,
  ];
  if (!empty($bundle)) {
    $form['workflow']['entity_translation_unified_form']['entity_translation_unified_form_translate_labels']['#default_value'] = entity_translation_unified_form_translate_labels_enabled($entity_type_id, $bundle);
    $form['workflow']['entity_translation_unified_form']['entity_translation_unified_form_translate_labels']['#states'] = [
      'visible' => [
        ':input[name="settings[' . $entity_type_id . '][' . $bundle . '][settings][content_translation][entity_translation_unified_form_enable]"]'
        => ['checked' => TRUE],
@@ -160,8 +164,8 @@ function entity_translation_unified_form_form_node_type_form_process(&$form, $fo
          'checked' => TRUE,
        ],
      ],
    ],
    ];
  }
  $form['workflow']['entity_translation_unified_form']['entity_translation_unified_form_sbs_enable'] = [
    '#title' => t('Enable side-by-side UI mode on the node add/edit form'),
    '#type' => 'checkbox',