Skip to content

Commit

Permalink
Replaced drupal state condition with JS due to bug in Drupal core #st…
Browse files Browse the repository at this point in the history
…ates when using ajax
  • Loading branch information
yeniatencio committed Oct 28, 2024
1 parent af3eca9 commit 0e68315
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions modules/tide_landing_page/js/hero_image_theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
}

let defaultHeaderStyle = selectedHeaderStyle.value;
imageTheme.disabled =
defaultHeaderStyle === "corner" ? false : true;
imageTheme.value =
defaultHeaderStyle === "fullwidth" ? "dark" : "light";
}
Expand Down
4 changes: 0 additions & 4 deletions modules/tide_landing_page/tide_landing_page.module
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,6 @@ function _tide_landing_page_form_node_form_process(array $form, FormStateInterfa
],
];

$form['field_landing_page_hero_image']['widget']['field_landing_page_hero_theme']['#states']['enabled'] = [
':input[name="_header_style_options"]' => ['value' => 'corner'],
];

$form['field_graphical_image']['#states']['visible'] = [
':input[name="_header_style_options"]' => ['value' => 'corner'],
];
Expand Down

0 comments on commit 0e68315

Please sign in to comment.