diff --git a/config/sync/core.entity_form_display.node.vba_facility.default.yml b/config/sync/core.entity_form_display.node.vba_facility.default.yml index 63ea8515e7c..5b7f257a700 100644 --- a/config/sync/core.entity_form_display.node.vba_facility.default.yml +++ b/config/sync/core.entity_form_display.node.vba_facility.default.yml @@ -8,6 +8,7 @@ dependencies: - field.field.node.vba_facility.field_alert_type - field.field.node.vba_facility.field_banner_content - field.field.node.vba_facility.field_banner_title + - field.field.node.vba_facility.field_banner_types_description - field.field.node.vba_facility.field_cc_benefit_office_hours_va - field.field.node.vba_facility.field_cc_benefits_hotline - field.field.node.vba_facility.field_cc_cant_find_benefits @@ -32,9 +33,9 @@ dependencies: - field.field.node.vba_facility.field_operating_status_more_info - field.field.node.vba_facility.field_phone_number - field.field.node.vba_facility.field_shared_vha_location + - field.field.node.vba_facility.field_show_banner - field.field.node.vba_facility.field_table_of_contents - field.field.node.vba_facility.field_timezone - - field.field.node.vba_facility.field_show_banner - node.type.vba_facility - workflows.workflow.editorial module: @@ -302,17 +303,18 @@ third_party_settings: group_banner: children: - field_show_banner + - field_banner_types_description - field_alert_type - field_dismissible_option - field_banner_title - field_banner_content - label: Banner + label: 'Banner alert' region: content parent_name: '' weight: 2 format_type: detailswithimage format_settings: - description: 'This optional segment allows you to add a banner to the VBA facility.' + description: 'This optional segment allows you to add a banner alert to the VBA facility.' open: '1' visual_guide_file_name: '' visual_guide_alt_text: '' @@ -339,13 +341,13 @@ content: third_party_settings: { } field_alert_type: type: options_select - weight: 28 + weight: 29 region: content settings: { } third_party_settings: { } field_banner_content: type: text_textarea_with_counter - weight: 31 + weight: 32 region: content settings: rows: 5 @@ -362,12 +364,18 @@ content: hide_guidelines: '1' field_banner_title: type: string_textfield - weight: 30 + weight: 31 region: content settings: size: 60 placeholder: '' third_party_settings: { } + field_banner_types_description: + type: markup + weight: 28 + region: content + settings: { } + third_party_settings: { } field_cc_benefit_office_hours_va: type: entity_field_fetch_widget weight: 13 @@ -442,7 +450,7 @@ content: third_party_settings: { } field_dismissible_option: type: options_buttons - weight: 29 + weight: 30 region: content settings: { } third_party_settings: { } @@ -570,6 +578,13 @@ content: size: 60 placeholder: '' third_party_settings: { } + field_show_banner: + type: boolean_checkbox + weight: 27 + region: content + settings: + display_label: true + third_party_settings: { } field_table_of_contents: type: markup weight: 0 @@ -582,13 +597,6 @@ content: region: content settings: { } third_party_settings: { } - field_show_banner: - type: boolean_checkbox - weight: 27 - region: content - settings: - display_label: true - third_party_settings: { } flag: weight: 6 region: content diff --git a/config/sync/core.entity_view_display.node.vba_facility.default.yml b/config/sync/core.entity_view_display.node.vba_facility.default.yml index c0ac5c83694..f34b7d1b831 100644 --- a/config/sync/core.entity_view_display.node.vba_facility.default.yml +++ b/config/sync/core.entity_view_display.node.vba_facility.default.yml @@ -8,6 +8,7 @@ dependencies: - field.field.node.vba_facility.field_alert_type - field.field.node.vba_facility.field_banner_content - field.field.node.vba_facility.field_banner_title + - field.field.node.vba_facility.field_banner_types_description - field.field.node.vba_facility.field_cc_benefit_office_hours_va - field.field.node.vba_facility.field_cc_benefits_hotline - field.field.node.vba_facility.field_cc_cant_find_benefits @@ -32,9 +33,9 @@ dependencies: - field.field.node.vba_facility.field_operating_status_more_info - field.field.node.vba_facility.field_phone_number - field.field.node.vba_facility.field_shared_vha_location + - field.field.node.vba_facility.field_show_banner - field.field.node.vba_facility.field_table_of_contents - field.field.node.vba_facility.field_timezone - - field.field.node.vba_facility.field_show_banner - node.type.vba_facility module: - address @@ -492,13 +493,6 @@ content: third_party_settings: { } weight: 12 region: content - field_timezone: - type: basic_string - label: above - settings: { } - third_party_settings: { } - weight: 9 - region: content field_show_banner: type: boolean label: above @@ -509,10 +503,18 @@ content: third_party_settings: { } weight: 14 region: content + field_timezone: + type: basic_string + label: above + settings: { } + third_party_settings: { } + weight: 9 + region: content hidden: breadcrumbs: true content_moderation_control: true field_administration: true + field_banner_types_description: true field_facility_vba_classificatio: true field_geolocation: true field_last_saved_by_an_editor: true diff --git a/config/sync/core.entity_view_display.node.vba_facility.external_content.yml b/config/sync/core.entity_view_display.node.vba_facility.external_content.yml index 5c52d979909..f0e93967411 100644 --- a/config/sync/core.entity_view_display.node.vba_facility.external_content.yml +++ b/config/sync/core.entity_view_display.node.vba_facility.external_content.yml @@ -9,6 +9,7 @@ dependencies: - field.field.node.vba_facility.field_alert_type - field.field.node.vba_facility.field_banner_content - field.field.node.vba_facility.field_banner_title + - field.field.node.vba_facility.field_banner_types_description - field.field.node.vba_facility.field_cc_benefit_office_hours_va - field.field.node.vba_facility.field_cc_benefits_hotline - field.field.node.vba_facility.field_cc_cant_find_benefits @@ -33,9 +34,9 @@ dependencies: - field.field.node.vba_facility.field_operating_status_more_info - field.field.node.vba_facility.field_phone_number - field.field.node.vba_facility.field_shared_vha_location + - field.field.node.vba_facility.field_show_banner - field.field.node.vba_facility.field_table_of_contents - field.field.node.vba_facility.field_timezone - - field.field.node.vba_facility.field_show_banner - node.type.vba_facility module: - address @@ -251,6 +252,7 @@ hidden: field_alert_type: true field_banner_content: true field_banner_title: true + field_banner_types_description: true field_cc_benefit_office_hours_va: true field_cc_benefits_hotline: true field_cc_cant_find_benefits: true @@ -266,8 +268,8 @@ hidden: field_media: true field_operating_status_facility: true field_operating_status_more_info: true - field_table_of_contents: true field_show_banner: true + field_table_of_contents: true flag_awaiting_csv: true flag_awaiting_editor: true flag_awaiting_redirect: true diff --git a/config/sync/core.entity_view_display.node.vba_facility.ief_table.yml b/config/sync/core.entity_view_display.node.vba_facility.ief_table.yml index 5b78441384c..35c646e72db 100644 --- a/config/sync/core.entity_view_display.node.vba_facility.ief_table.yml +++ b/config/sync/core.entity_view_display.node.vba_facility.ief_table.yml @@ -9,6 +9,7 @@ dependencies: - field.field.node.vba_facility.field_alert_type - field.field.node.vba_facility.field_banner_content - field.field.node.vba_facility.field_banner_title + - field.field.node.vba_facility.field_banner_types_description - field.field.node.vba_facility.field_cc_benefit_office_hours_va - field.field.node.vba_facility.field_cc_benefits_hotline - field.field.node.vba_facility.field_cc_cant_find_benefits @@ -33,9 +34,9 @@ dependencies: - field.field.node.vba_facility.field_operating_status_more_info - field.field.node.vba_facility.field_phone_number - field.field.node.vba_facility.field_shared_vha_location + - field.field.node.vba_facility.field_show_banner - field.field.node.vba_facility.field_table_of_contents - field.field.node.vba_facility.field_timezone - - field.field.node.vba_facility.field_show_banner - node.type.vba_facility module: - address @@ -184,6 +185,7 @@ hidden: field_alert_type: true field_banner_content: true field_banner_title: true + field_banner_types_description: true field_cc_benefit_office_hours_va: true field_cc_benefits_hotline: true field_cc_cant_find_benefits: true @@ -203,9 +205,9 @@ hidden: field_non_va_official_name: true field_office: true field_shared_vha_location: true + field_show_banner: true field_table_of_contents: true field_timezone: true - field_show_banner: true flag_awaiting_csv: true flag_awaiting_editor: true flag_awaiting_redirect: true diff --git a/config/sync/core.entity_view_display.node.vba_facility.teaser.yml b/config/sync/core.entity_view_display.node.vba_facility.teaser.yml index fea140c58a3..6dec3464b4e 100644 --- a/config/sync/core.entity_view_display.node.vba_facility.teaser.yml +++ b/config/sync/core.entity_view_display.node.vba_facility.teaser.yml @@ -9,6 +9,7 @@ dependencies: - field.field.node.vba_facility.field_alert_type - field.field.node.vba_facility.field_banner_content - field.field.node.vba_facility.field_banner_title + - field.field.node.vba_facility.field_banner_types_description - field.field.node.vba_facility.field_cc_benefit_office_hours_va - field.field.node.vba_facility.field_cc_benefits_hotline - field.field.node.vba_facility.field_cc_cant_find_benefits @@ -33,9 +34,9 @@ dependencies: - field.field.node.vba_facility.field_operating_status_more_info - field.field.node.vba_facility.field_phone_number - field.field.node.vba_facility.field_shared_vha_location + - field.field.node.vba_facility.field_show_banner - field.field.node.vba_facility.field_table_of_contents - field.field.node.vba_facility.field_timezone - - field.field.node.vba_facility.field_show_banner - node.type.vba_facility module: - user @@ -61,6 +62,7 @@ hidden: field_alert_type: true field_banner_content: true field_banner_title: true + field_banner_types_description: true field_cc_benefit_office_hours_va: true field_cc_benefits_hotline: true field_cc_cant_find_benefits: true @@ -85,9 +87,9 @@ hidden: field_operating_status_more_info: true field_phone_number: true field_shared_vha_location: true + field_show_banner: true field_table_of_contents: true field_timezone: true - field_show_banner: true flag_awaiting_csv: true flag_awaiting_editor: true flag_awaiting_redirect: true diff --git a/config/sync/field.field.node.vba_facility.field_alert_type.yml b/config/sync/field.field.node.vba_facility.field_alert_type.yml index a0fdce5a966..e948e81aaa2 100644 --- a/config/sync/field.field.node.vba_facility.field_alert_type.yml +++ b/config/sync/field.field.node.vba_facility.field_alert_type.yml @@ -15,7 +15,7 @@ id: node.vba_facility.field_alert_type field_name: field_alert_type entity_type: node bundle: vba_facility -label: 'Banner type' +label: 'Banner alert type' description: '' required: false translatable: true diff --git a/config/sync/field.field.node.vba_facility.field_banner_content.yml b/config/sync/field.field.node.vba_facility.field_banner_content.yml index db4486575e9..a1140348cc9 100644 --- a/config/sync/field.field.node.vba_facility.field_banner_content.yml +++ b/config/sync/field.field.node.vba_facility.field_banner_content.yml @@ -19,7 +19,7 @@ id: node.vba_facility.field_banner_content field_name: field_banner_content entity_type: node bundle: vba_facility -label: 'Banner content' +label: 'Banner alert message' description: '' required: false translatable: false diff --git a/config/sync/field.field.node.vba_facility.field_banner_title.yml b/config/sync/field.field.node.vba_facility.field_banner_title.yml index 7089d72e79e..1cfc5d62d5f 100644 --- a/config/sync/field.field.node.vba_facility.field_banner_title.yml +++ b/config/sync/field.field.node.vba_facility.field_banner_title.yml @@ -14,7 +14,7 @@ id: node.vba_facility.field_banner_title field_name: field_banner_title entity_type: node bundle: vba_facility -label: 'Banner title' +label: 'Banner alert headline' description: '' required: false translatable: false diff --git a/docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php b/docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php index 35eacf29063..ace35421b76 100644 --- a/docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php +++ b/docroot/modules/custom/va_gov_vba_facility/src/EventSubscriber/VbaFacilitySubscriber.php @@ -150,6 +150,12 @@ public function addStateManagementToBannerFields(FormIdAlterEvent $event) { $selector = ':input[name="field_show_banner[value]"]'; // Show and require the banner fields when show banner is checked. + $form['field_banner_types_description']['#states'] = [ + 'visible' => [ + [$selector => ['checked' => TRUE]], + ], + ]; + $form['field_alert_type']['widget']['#states'] = [ 'required' => [ [$selector => ['checked' => TRUE]],