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-3051: not needed template update #1081

Merged
merged 2 commits into from
Oct 29, 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
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,31 @@
#}

{% block aside %}
{# keep empty for not needed #}
{# keep empty for not needed #}
{% endblock %}

{% block content %}
{% if registration_not_needed is not empty %}
<h2>{{ registration_not_needed.heading }}</h2>
{% if registration_not_needed is not empty %}
{# setting link text to be in inline hyper link #}
{% if registration_not_needed.link_text %}
{% set link_markup %}
<a href="{{ more_info_link }}">{{ registration_not_needed.link_text | render | trim | t({'@state_name': title_english}) }}</a>
{% endset %}
{% endif %}
{# setting body text to have palceholder for both state name and link #}
{% set body = registration_not_needed.text['#markup']| t({'@state_name': title_english, '@link': {'#markup': link_markup } | render}) %}

{{ registration_not_needed.text }}
{% include '@votegov/component/info-card.html.twig' with {
'heading': registration_not_needed.heading,
'body': body,
} %}

{% if more_info_link and registration_not_needed.link_text %}
<p>
{% include '@votegov/component/button.html.twig' with {
'label': registration_not_needed.link_text,
'href': more_info_link
} %}
</p>
{% endif %}
{% endif %}
{% if military_overseas_registration is not empty %}
{% include '@votegov/component/info-card.html.twig' with {
'heading': military_overseas_registration.heading,
'body': military_overseas_registration.text,
} %}
{% endif %}

{% if military_overseas_registration is not empty %}
{{ military_overseas_registration }}
{% endif %}
{% endif %}

{# JSON Schema #}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i saw that this hasnt been used in 3 months so wasnt sure if it was still needed or not?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can delete this. We have the legacy pages to reference if we want to add back in.

{# Commenting this out until we have a chance to review and improve #}
{# <script type="application/ld+json">#}
{# {#}
{# "@context": "https://schema.org",#}
{# "@type": "FAQPage",#}
{# "mainEntity": [{#}
{# "@type": "Question",#}
{# "name": "{{ 'How to register to vote' | t({ '@state_name': state_name }) }}",#}
{# "acceptedAnswer": {#}
{# "@type": "Answer",#}
{# "text": "{{ 'Voter registration is not required in @state_name. @link on @state_name’s election website.' | t({#}
{# '@link': { "#markup": "<a href=\"#{more_info_link}\">#{more_info_link_text}</a>"} | render | replace({'"': "\""}),#}
{# '@state_name': state_name,#}
{# '@of_state_name': of_state_name,#}
{# '@in_state_name': in_state_name#}
{# }) }}"#}
{# }#}
{# }{{ end }}]#}
{# }#}
{#</script>#}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,13 @@
} %}
{% endif %}
{% endblock %}

{# Checking if updated date is set and then render the field #}
{% if content.field_updated_date | field_value is not empty %}
<p class="vote-date--updated">
{# Striptags and raw filters were added to accomodate Navajo date formats. #}
{{'Last updated:' | t }} {{ content.field_updated_date | render | replace(t_numbers[language].numbers | default([])) | striptags('<span>') | raw }}
</p>
{% endif %}
</div>
</div>