Skip to content

Commit

Permalink
VACMS-14700: Updates UI per Figma
Browse files Browse the repository at this point in the history
  • Loading branch information
omahane committed Nov 17, 2023
1 parent 33c2d32 commit 7b8ac99
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 31 deletions.
36 changes: 22 additions & 14 deletions config/sync/core.entity_form_display.node.vba_facility.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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: ''
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -442,7 +450,7 @@ content:
third_party_settings: { }
field_dismissible_option:
type: options_buttons
weight: 29
weight: 30
region: content
settings: { }
third_party_settings: { }
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 10 additions & 8 deletions config/sync/core.entity_view_display.node.vba_facility.default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]],
Expand Down

0 comments on commit 7b8ac99

Please sign in to comment.