Skip to content

Commit

Permalink
VOTE-2341: Add NVRF link option to State page (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlloydbixal authored Aug 9, 2024
1 parent ba81726 commit 80a0555
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,34 @@ dependencies:
- block_content.type.registration_form_selector
- field.field.block_content.registration_form_selector.field_default_option_label
- field.field.block_content.registration_form_selector.field_description
- field.field.block_content.registration_form_selector.field_digital_form_link
- field.field.block_content.registration_form_selector.field_digital_form_paragraph
- field.field.block_content.registration_form_selector.field_heading
- field.field.block_content.registration_form_selector.field_registration_form_link
- field.field.block_content.registration_form_selector.field_submit_button_label
module:
- field_group
- link
- link_attributes
- text
third_party_settings:
field_group:
group_digital_form:
children:
- field_digital_form_paragraph
- field_digital_form_link
label: 'Digital Form'
region: content
parent_name: ''
weight: 8
format_type: details
format_settings:
classes: ''
show_empty_fields: false
id: ''
open: false
description: ''
required_fields: true
id: block_content.registration_form_selector.default
targetEntityType: block_content
bundle: registration_form_selector
Expand All @@ -32,6 +55,22 @@ content:
size: 60
placeholder: ''
third_party_settings: { }
field_digital_form_link:
type: link_default
weight: 10
region: content
settings:
placeholder_url: ''
placeholder_title: ''
third_party_settings: { }
field_digital_form_paragraph:
type: text_textarea
weight: 9
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
field_heading:
type: string_textfield
weight: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ dependencies:
- block_content.type.registration_form_selector
- field.field.block_content.registration_form_selector.field_default_option_label
- field.field.block_content.registration_form_selector.field_description
- field.field.block_content.registration_form_selector.field_digital_form_link
- field.field.block_content.registration_form_selector.field_digital_form_paragraph
- field.field.block_content.registration_form_selector.field_heading
- field.field.block_content.registration_form_selector.field_registration_form_link
- field.field.block_content.registration_form_selector.field_submit_button_label
module:
- link
- text
id: block_content.registration_form_selector.default
targetEntityType: block_content
bundle: registration_form_selector
Expand All @@ -32,6 +35,25 @@ content:
third_party_settings: { }
weight: 1
region: content
field_digital_form_link:
type: link_separate
label: hidden
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
third_party_settings: { }
weight: 7
region: content
field_digital_form_paragraph:
type: text_default
label: hidden
settings: { }
third_party_settings: { }
weight: 8
region: content
field_heading:
type: string
label: hidden
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
uuid: a92587e0-e01f-475a-8831-07a5299a1b7b
langcode: en
status: true
dependencies:
config:
- block_content.type.registration_form_selector
- field.storage.block_content.field_digital_form_link
module:
- link
id: block_content.registration_form_selector.field_digital_form_link
field_name: field_digital_form_link
entity_type: block_content
bundle: registration_form_selector
label: 'Digital form link'
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
title: 2
link_type: 17
field_type: link
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
uuid: cb633190-ab29-4b6a-8798-506007d410db
langcode: en
status: true
dependencies:
config:
- block_content.type.registration_form_selector
- field.storage.block_content.field_digital_form_paragraph
- filter.format.simple_html
module:
- text
id: block_content.registration_form_selector.field_digital_form_paragraph
field_name: field_digital_form_paragraph
entity_type: block_content
bundle: registration_form_selector
label: 'Digital form paragraph'
description: ''
required: false
translatable: true
default_value: { }
default_value_callback: ''
settings:
allowed_formats:
- simple_html
field_type: text_long
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 1b0313da-9640-4b22-a165-e0a91322e38b
langcode: en
status: true
dependencies:
module:
- block_content
- link
id: block_content.field_digital_form_link
field_name: field_digital_form_link
entity_type: block_content
type: link
settings: { }
module: link
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: da7d778b-3f42-4131-b985-2bc7a880f22d
langcode: en
status: true
dependencies:
module:
- block_content
- text
id: block_content.field_digital_form_paragraph
field_name: field_digital_form_paragraph
entity_type: block_content
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@
{# Hold these title_* placeholders for potential integration #}
{{ title_prefix }}
{{ title_suffix }}

<h2>{{ content.field_heading | field_value | render | replace({"@state_name": currentnode.getTitle()}) | raw }}</h2>

{{ content.field_digital_form_paragraph | field_value }}
{% if content.field_digital_form_link | render %}
<p>
{% include '@votegov/component/button.html.twig' with {
'href': elements['#block_content'].field_digital_form_link.0.url,
'label': elements['#block_content'].field_digital_form_link.0.title
} %}
</p>
{% endif %}

<form class="usa-form" method="get" id="register_form_download" data-test="nvrfForm">
<p>{{ content.field_description | field_value }}</p>
<div class="field">
Expand Down

0 comments on commit 80a0555

Please sign in to comment.