Skip to content

Commit

Permalink
removed js
Browse files Browse the repository at this point in the history
  • Loading branch information
yeniatencio committed Nov 25, 2024
1 parent c2996c2 commit 6a00fe0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 43 deletions.
40 changes: 0 additions & 40 deletions modules/tide_landing_page/js/hero_image_theme.js

This file was deleted.

9 changes: 9 additions & 0 deletions modules/tide_landing_page/tests/behat/features/fields.feature
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,12 @@ Feature: Fields for Landing Page content type
# This field can be "seen" but not visible.
And I see field "field_landing_page_component[0][subform][field_customise][value]"
And save screenshot

@api @javascript
Scenario: Selecting a value from the field Hero image theme.
Given I am logged in as a user with the "create landing_page content" permission
When I visit "node/add/landing_page"
And I click "Customised Header"
Then I select "Corner graphics" from "edit-header-style-options-corner"
Then I select "Hero image theme" from "edit-field-landing-page-hero-theme"
And save screenshot
1 change: 1 addition & 0 deletions modules/tide_landing_page/tide_landing_page.install
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ function tide_landing_page_update_10107() {
if (!empty($field)) {
$field->setLabel('Hero image theme');
$field->setRequired(TRUE);
$field->setDefaultValue('light');
$field->save();
}
}
Expand Down
1 change: 0 additions & 1 deletion modules/tide_landing_page/tide_landing_page.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ landing_page_form:
js:
js/hide_elements.js: {}
js/statistics_grid.js: {}
js/hero_image_theme.js: {}
dependencies:
- core/jquery
4 changes: 2 additions & 2 deletions modules/tide_landing_page/tide_landing_page.module
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ function tide_landing_page_field_widget_single_element_paragraphs_form_alter(&$e
}

/**
* Function to change value.
* Function to set value to Hero image theme.
*
* @param array $form
* The form.
Expand All @@ -386,7 +386,7 @@ function tide_landing_page_field_widget_single_element_paragraphs_form_alter(&$e
* @return Drupal\Core\Ajax\AjaxResponse
* The response.
*/
function tide_landing_page_change_the_value(array $form, FormStateInterface $form_state): AjaxResponse {
function tide_landing_page_set_value_hero_image_theme(array $form, FormStateInterface $form_state): AjaxResponse {
$response = new AjaxResponse();
$value = $form_state->getValue('_header_style_options');
if ($value === 'fullwidth') {
Expand Down

0 comments on commit 6a00fe0

Please sign in to comment.