From 9d3ae3ef40c9092a1c5abec55f359523faa7fdaa Mon Sep 17 00:00:00 2001 From: SamiraMSadat Date: Mon, 25 Nov 2024 09:22:28 -0700 Subject: [PATCH 1/3] VOTE-3134 Display new online and in person field values --- ...w_display.node.state_territory.default.yml | 4 ++-- ...view_display.node.state_territory.full.yml | 20 +++++++++++++++++-- .../node/node--state-territory.html.twig | 4 ++-- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/config/sync/core.entity_view_display.node.state_territory.default.yml b/config/sync/core.entity_view_display.node.state_territory.default.yml index fbad40571..08bc7585e 100644 --- a/config/sync/core.entity_view_display.node.state_territory.default.yml +++ b/config/sync/core.entity_view_display.node.state_territory.default.yml @@ -119,7 +119,7 @@ content: label: above settings: timezone_override: '' - format_type: medium + format_type: long_date third_party_settings: { } weight: 49 region: content @@ -128,7 +128,7 @@ content: label: above settings: timezone_override: '' - format_type: medium + format_type: long_date third_party_settings: { } weight: 48 region: content diff --git a/config/sync/core.entity_view_display.node.state_territory.full.yml b/config/sync/core.entity_view_display.node.state_territory.full.yml index 873399cf4..37c8c872c 100644 --- a/config/sync/core.entity_view_display.node.state_territory.full.yml +++ b/config/sync/core.entity_view_display.node.state_territory.full.yml @@ -98,6 +98,24 @@ content: third_party_settings: { } weight: 15 region: content + field_date_in_person_deadline: + type: datetime_default + label: hidden + settings: + timezone_override: '' + format_type: long_date + third_party_settings: { } + weight: 33 + region: content + field_date_online_deadline: + type: datetime_default + label: hidden + settings: + timezone_override: '' + format_type: long_date + third_party_settings: { } + weight: 34 + region: content field_election_homepage_link: type: link label: hidden @@ -393,8 +411,6 @@ hidden: body: true field_address_location_inst: true field_content_version: true - field_date_in_person_deadline: true - field_date_online_deadline: true field_identification_inst: true field_mailing_address_inst: true field_metatags: true diff --git a/web/themes/custom/votegov/templates/node/node--state-territory.html.twig b/web/themes/custom/votegov/templates/node/node--state-territory.html.twig index ccb014ef2..6e51f7b33 100644 --- a/web/themes/custom/votegov/templates/node/node--state-territory.html.twig +++ b/web/themes/custom/votegov/templates/node/node--state-territory.html.twig @@ -19,8 +19,8 @@ {% set state_mail_pdf_link = content.field_override_mail_reg_link | field_value | default(content.field_mail_registration_link | field_value) | render | trim %} {# Deadlines with fallbacks. #} -{% set online_deadline = content.field_online_deadline | field_value | default(content.field_g_online_deadline | field_value) %} -{% set inperson_deadline = content.field_in_person_deadline | field_value | default(content.field_g_in_person_deadline | field_value) %} +{% set online_deadline = content.field_date_online_deadline | field_value | default(content.field_g_online_deadline | field_value) %} +{% set inperson_deadline = content.field_date_in_person_deadline | field_value | default(content.field_g_in_person_deadline | field_value) %} {# Set postmarked deadline with fallback #} {% if content.field_mail_postmarked_deadline | render %} {% set postmarked_deadline = 'Must be postmarked by @date' | t({'@date': content.field_mail_postmarked_deadline.0 | render}) %} From 6e3a95c198ec7d94d8e4faf8f07abd509364229b Mon Sep 17 00:00:00 2001 From: SamiraMSadat Date: Mon, 25 Nov 2024 09:32:15 -0700 Subject: [PATCH 2/3] VOTE-3134 Remove double fields --- ...m_display.node.state_territory.default.yml | 49 ------------------- ...w_display.node.state_territory.default.yml | 47 ------------------ ...view_display.node.state_territory.full.yml | 47 ------------------ ...ew_display.node.state_territory.teaser.yml | 4 -- ...ate_territory.field_in_person_deadline.yml | 39 --------------- ....state_territory.field_online_deadline.yml | 39 --------------- ....storage.node.field_in_person_deadline.yml | 32 ------------ ...eld.storage.node.field_online_deadline.yml | 32 ------------ 8 files changed, 289 deletions(-) delete mode 100644 config/sync/field.field.node.state_territory.field_in_person_deadline.yml delete mode 100644 config/sync/field.field.node.state_territory.field_online_deadline.yml delete mode 100644 config/sync/field.storage.node.field_in_person_deadline.yml delete mode 100644 config/sync/field.storage.node.field_online_deadline.yml diff --git a/config/sync/core.entity_form_display.node.state_territory.default.yml b/config/sync/core.entity_form_display.node.state_territory.default.yml index d66b01117..f0e4f5633 100644 --- a/config/sync/core.entity_form_display.node.state_territory.default.yml +++ b/config/sync/core.entity_form_display.node.state_territory.default.yml @@ -17,7 +17,6 @@ dependencies: - field.field.node.state_territory.field_g_mail_received_deadline - field.field.node.state_territory.field_g_online_deadline - field.field.node.state_territory.field_identification_inst - - field.field.node.state_territory.field_in_person_deadline - field.field.node.state_territory.field_in_person_registration - field.field.node.state_territory.field_in_state_name - field.field.node.state_territory.field_is_state @@ -34,7 +33,6 @@ dependencies: - field.field.node.state_territory.field_nvrf_fields - field.field.node.state_territory.field_nvrf_last_updated_date - field.field.node.state_territory.field_of_state_name - - field.field.node.state_territory.field_online_deadline - field.field.node.state_territory.field_online_registration - field.field.node.state_territory.field_override_confirm_reg_link - field.field.node.state_territory.field_override_election_hp_link @@ -55,7 +53,6 @@ dependencies: module: - content_moderation - datetime - - double_field - field_group - link - media_library @@ -365,29 +362,6 @@ content: rows: 5 placeholder: '' third_party_settings: { } - field_in_person_deadline: - type: double_field - weight: 6 - region: content - settings: - first: - type: datetime - label_display: block - size: 30 - placeholder: '' - label: Ok - cols: 10 - rows: 5 - second: - type: textfield - label_display: block - size: 8 - placeholder: '11:59 PM' - label: Ok - cols: 10 - rows: 5 - inline: true - third_party_settings: { } field_in_person_registration: type: vote_fields_state_content weight: 17 @@ -522,29 +496,6 @@ content: size: 60 placeholder: '' third_party_settings: { } - field_online_deadline: - type: double_field - weight: 7 - region: content - settings: - first: - type: datetime - label_display: block - size: 30 - placeholder: '' - label: Ok - cols: 10 - rows: 5 - second: - type: textfield - label_display: block - size: 8 - placeholder: '11:59 PM' - label: Ok - cols: 10 - rows: 5 - inline: true - third_party_settings: { } field_online_registration: type: vote_fields_state_content weight: 14 diff --git a/config/sync/core.entity_view_display.node.state_territory.default.yml b/config/sync/core.entity_view_display.node.state_territory.default.yml index 08bc7585e..045539cb4 100644 --- a/config/sync/core.entity_view_display.node.state_territory.default.yml +++ b/config/sync/core.entity_view_display.node.state_territory.default.yml @@ -17,7 +17,6 @@ dependencies: - field.field.node.state_territory.field_g_mail_received_deadline - field.field.node.state_territory.field_g_online_deadline - field.field.node.state_territory.field_identification_inst - - field.field.node.state_territory.field_in_person_deadline - field.field.node.state_territory.field_in_person_registration - field.field.node.state_territory.field_in_state_name - field.field.node.state_territory.field_is_state @@ -34,7 +33,6 @@ dependencies: - field.field.node.state_territory.field_nvrf_fields - field.field.node.state_territory.field_nvrf_last_updated_date - field.field.node.state_territory.field_of_state_name - - field.field.node.state_territory.field_online_deadline - field.field.node.state_territory.field_online_registration - field.field.node.state_territory.field_override_confirm_reg_link - field.field.node.state_territory.field_override_election_hp_link @@ -53,7 +51,6 @@ dependencies: - node.type.state_territory module: - datetime - - double_field - link - metatag - text @@ -183,28 +180,6 @@ content: third_party_settings: { } weight: 25 region: content - field_in_person_deadline: - type: double_field_unformatted_list - label: hidden - settings: - first: - format_type: long_date - link: false - hidden: false - decimal_separator: . - thousand_separator: '' - scale: 2 - second: - format_type: medium - link: false - hidden: false - decimal_separator: . - thousand_separator: '' - scale: 2 - inline: true - third_party_settings: { } - weight: 14 - region: content field_in_person_registration: type: vote_fields_state_content_default label: above @@ -330,28 +305,6 @@ content: third_party_settings: { } weight: 22 region: content - field_online_deadline: - type: double_field_unformatted_list - label: hidden - settings: - first: - format_type: long_date - link: false - hidden: false - decimal_separator: . - thousand_separator: '' - scale: 2 - second: - format_type: medium - link: false - hidden: false - decimal_separator: . - thousand_separator: '' - scale: 2 - inline: true - third_party_settings: { } - weight: 8 - region: content field_online_registration: type: vote_fields_state_content_default label: above diff --git a/config/sync/core.entity_view_display.node.state_territory.full.yml b/config/sync/core.entity_view_display.node.state_territory.full.yml index 37c8c872c..77977d3cd 100644 --- a/config/sync/core.entity_view_display.node.state_territory.full.yml +++ b/config/sync/core.entity_view_display.node.state_territory.full.yml @@ -18,7 +18,6 @@ dependencies: - field.field.node.state_territory.field_g_mail_received_deadline - field.field.node.state_territory.field_g_online_deadline - field.field.node.state_territory.field_identification_inst - - field.field.node.state_territory.field_in_person_deadline - field.field.node.state_territory.field_in_person_registration - field.field.node.state_territory.field_in_state_name - field.field.node.state_territory.field_is_state @@ -35,7 +34,6 @@ dependencies: - field.field.node.state_territory.field_nvrf_fields - field.field.node.state_territory.field_nvrf_last_updated_date - field.field.node.state_territory.field_of_state_name - - field.field.node.state_territory.field_online_deadline - field.field.node.state_territory.field_online_registration - field.field.node.state_territory.field_override_confirm_reg_link - field.field.node.state_territory.field_override_election_hp_link @@ -54,7 +52,6 @@ dependencies: - node.type.state_territory module: - datetime - - double_field - link - options - user @@ -160,28 +157,6 @@ content: third_party_settings: { } weight: 8 region: content - field_in_person_deadline: - type: double_field_unformatted_list - label: hidden - settings: - first: - format_type: long_date - link: false - hidden: false - decimal_separator: . - thousand_separator: '' - scale: 2 - second: - format_type: medium - link: false - hidden: false - decimal_separator: . - thousand_separator: '' - scale: 2 - inline: true - third_party_settings: { } - weight: 13 - region: content field_in_person_registration: type: vote_fields_state_content_default label: hidden @@ -287,28 +262,6 @@ content: third_party_settings: { } weight: 23 region: content - field_online_deadline: - type: double_field_unformatted_list - label: hidden - settings: - first: - format_type: long_date - link: false - hidden: false - decimal_separator: . - thousand_separator: '' - scale: 2 - second: - format_type: medium - link: false - hidden: false - decimal_separator: . - thousand_separator: '' - scale: 2 - inline: true - third_party_settings: { } - weight: 7 - region: content field_online_registration: type: vote_fields_state_content_default label: hidden diff --git a/config/sync/core.entity_view_display.node.state_territory.teaser.yml b/config/sync/core.entity_view_display.node.state_territory.teaser.yml index f01b7e647..c57c0641f 100644 --- a/config/sync/core.entity_view_display.node.state_territory.teaser.yml +++ b/config/sync/core.entity_view_display.node.state_territory.teaser.yml @@ -18,7 +18,6 @@ dependencies: - field.field.node.state_territory.field_g_mail_received_deadline - field.field.node.state_territory.field_g_online_deadline - field.field.node.state_territory.field_identification_inst - - field.field.node.state_territory.field_in_person_deadline - field.field.node.state_territory.field_in_person_registration - field.field.node.state_territory.field_in_state_name - field.field.node.state_territory.field_is_state @@ -35,7 +34,6 @@ dependencies: - field.field.node.state_territory.field_nvrf_fields - field.field.node.state_territory.field_nvrf_last_updated_date - field.field.node.state_territory.field_of_state_name - - field.field.node.state_territory.field_online_deadline - field.field.node.state_territory.field_online_registration - field.field.node.state_territory.field_override_confirm_reg_link - field.field.node.state_territory.field_override_election_hp_link @@ -84,7 +82,6 @@ hidden: field_g_mail_received_deadline: true field_g_online_deadline: true field_identification_inst: true - field_in_person_deadline: true field_in_person_registration: true field_in_state_name: true field_is_state: true @@ -101,7 +98,6 @@ hidden: field_nvrf_fields: true field_nvrf_last_updated_date: true field_of_state_name: true - field_online_deadline: true field_online_registration: true field_override_confirm_reg_link: true field_override_election_hp_link: true diff --git a/config/sync/field.field.node.state_territory.field_in_person_deadline.yml b/config/sync/field.field.node.state_territory.field_in_person_deadline.yml deleted file mode 100644 index 4c612533b..000000000 --- a/config/sync/field.field.node.state_territory.field_in_person_deadline.yml +++ /dev/null @@ -1,39 +0,0 @@ -uuid: 6ba62bcb-0ddf-4e86-b473-d29a94dae48d -langcode: en -status: true -dependencies: - config: - - field.storage.node.field_in_person_deadline - - node.type.state_territory - module: - - double_field -id: node.state_territory.field_in_person_deadline -field_name: field_in_person_deadline -entity_type: node -bundle: state_territory -label: 'In-person deadline' -description: '' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: - first: - label: Date - list: false - allowed_values: { } - max: null - min: null - required: true - on_label: 'On' - off_label: 'Off' - second: - label: Time - list: false - allowed_values: { } - max: null - min: null - required: false - on_label: 'On' - off_label: 'Off' -field_type: double_field diff --git a/config/sync/field.field.node.state_territory.field_online_deadline.yml b/config/sync/field.field.node.state_territory.field_online_deadline.yml deleted file mode 100644 index 24dbd1175..000000000 --- a/config/sync/field.field.node.state_territory.field_online_deadline.yml +++ /dev/null @@ -1,39 +0,0 @@ -uuid: 142ca270-a827-4c60-a346-c71bbf6db2a5 -langcode: en -status: true -dependencies: - config: - - field.storage.node.field_online_deadline - - node.type.state_territory - module: - - double_field -id: node.state_territory.field_online_deadline -field_name: field_online_deadline -entity_type: node -bundle: state_territory -label: 'Online deadline' -description: '' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: - first: - label: Date - list: false - allowed_values: { } - max: null - min: null - required: true - on_label: 'On' - off_label: 'Off' - second: - label: Time - list: false - allowed_values: { } - max: null - min: null - required: false - on_label: 'On' - off_label: 'Off' -field_type: double_field diff --git a/config/sync/field.storage.node.field_in_person_deadline.yml b/config/sync/field.storage.node.field_in_person_deadline.yml deleted file mode 100644 index fe479b1e3..000000000 --- a/config/sync/field.storage.node.field_in_person_deadline.yml +++ /dev/null @@ -1,32 +0,0 @@ -uuid: 6dd5d9cc-f690-460d-870e-a52e29b59d45 -langcode: en -status: true -dependencies: - module: - - double_field - - node -id: node.field_in_person_deadline -field_name: field_in_person_deadline -entity_type: node -type: double_field -settings: - storage: - first: - type: datetime_iso8601 - maxlength: 255 - precision: 10 - scale: 2 - datetime_type: date - second: - type: string - maxlength: 8 - precision: 10 - scale: 2 - datetime_type: datetime -module: double_field -locked: false -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false diff --git a/config/sync/field.storage.node.field_online_deadline.yml b/config/sync/field.storage.node.field_online_deadline.yml deleted file mode 100644 index f7106815a..000000000 --- a/config/sync/field.storage.node.field_online_deadline.yml +++ /dev/null @@ -1,32 +0,0 @@ -uuid: e0416ced-e99e-47ca-ae90-4c7bedd4cdfe -langcode: en -status: true -dependencies: - module: - - double_field - - node -id: node.field_online_deadline -field_name: field_online_deadline -entity_type: node -type: double_field -settings: - storage: - first: - type: datetime_iso8601 - maxlength: 255 - precision: 10 - scale: 2 - datetime_type: date - second: - type: string - maxlength: 8 - precision: 10 - scale: 2 - datetime_type: datetime -module: double_field -locked: false -cardinality: 1 -translatable: true -indexes: { } -persist_with_no_fields: false -custom_storage: false From 8faf5629e4d2bc26f19eb19465108120b9f25528 Mon Sep 17 00:00:00 2001 From: SamiraMSadat Date: Mon, 25 Nov 2024 09:34:00 -0700 Subject: [PATCH 3/3] VOTE-3134 Fix field labels --- ...field.node.state_territory.field_date_in_person_deadline.yml | 2 +- ...ld.field.node.state_territory.field_date_online_deadline.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/sync/field.field.node.state_territory.field_date_in_person_deadline.yml b/config/sync/field.field.node.state_territory.field_date_in_person_deadline.yml index 1421e6da7..8baf81df5 100644 --- a/config/sync/field.field.node.state_territory.field_date_in_person_deadline.yml +++ b/config/sync/field.field.node.state_territory.field_date_in_person_deadline.yml @@ -11,7 +11,7 @@ id: node.state_territory.field_date_in_person_deadline field_name: field_date_in_person_deadline entity_type: node bundle: state_territory -label: 'Date in-person deadline' +label: 'In-person deadline' description: '' required: false translatable: false diff --git a/config/sync/field.field.node.state_territory.field_date_online_deadline.yml b/config/sync/field.field.node.state_territory.field_date_online_deadline.yml index 8e450a3c4..58fc0f3bc 100644 --- a/config/sync/field.field.node.state_territory.field_date_online_deadline.yml +++ b/config/sync/field.field.node.state_territory.field_date_online_deadline.yml @@ -11,7 +11,7 @@ id: node.state_territory.field_date_online_deadline field_name: field_date_online_deadline entity_type: node bundle: state_territory -label: 'Date Online Deadline' +label: 'Online Deadline' description: '' required: false translatable: false