Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOTE-3037 Hide untranslated state links in registration tool #1073

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 54 additions & 2 deletions config/sync/views.view.state_territory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,59 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
view_node:
id: view_node
table: node
field: view_node
relationship: none
group_type: group
admin_label: ''
entity_type: node
plugin_id: entity_link
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
text: ''
output_url_as_text: true
absolute: false
pager:
type: none
options:
Expand Down Expand Up @@ -222,8 +275,7 @@ display:
plugin_id: language
operator: in
value:
'***LANGUAGE_site_default***': '***LANGUAGE_site_default***'
en: en
'***LANGUAGE_language_interface***': '***LANGUAGE_language_interface***'
group: 1
exposed: false
expose:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
{% endif %}
</div>
</div>
{% set results = drupal_view_result('state_territory', 'block') %}
{% if results | length %}
<form id="vote-registration-tool__form" class="vote-registration-tool__form">
<label class="{{ not content.field_body | render ? 'usa-sr-only' }} vote-registration-tool__label"
for="vote-registration-tool__input">
Expand All @@ -40,7 +42,6 @@
<div class="vote-registration-tool__list-container">
<div id="vote-registration-tool__results" class="vote-registration-tool__nav">
<ul class="vote-registration-tool__list" aria-label="{{ 'States and territories list' | t }}" data-test="stateList">
{% set results = drupal_view_result('state_territory', 'block') %}
{% for result in results %}
{% set nodeID = result._entity.id() %}
{% set node_path = path('entity.node.canonical', {'node': nodeID}) %}
Expand All @@ -56,5 +57,6 @@
</div>
</div>
</form>
{% endif %}
</div>
</section>