Skip to content

Commit

Permalink
VACMS-15411: Event CTA addition of Email Register button functionality (
Browse files Browse the repository at this point in the history
#1831)



---------

Co-authored-by: Chris Kim 
Co-authored-by: Chris Kim
  • Loading branch information
chriskim2311 authored Dec 19, 2023
1 parent 88855d9 commit 5f52c8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/site/layouts/event.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,18 @@
</p>
{% endif %}

{% if fieldHowToSignUp == 'email' %}
{% assign now = '' | currentTime %}
{% assign mostRecentDate = fieldDatetimeRangeTimezone | deriveMostRecentDate: now %}
<p class="vads-u-margin--0">
<a class="vads-c-action-link--green" href="mailto:{{ fieldCtaEmail }}?subject=RSVP for {{ title }} on {{ mostRecentDate | deriveFormattedTimestamp }}&body=I would like to register for {{title}} on {{ mostRecentDate | deriveFormattedTimestamp }}. (https://va.gov{{entityUrl.path}}) ">
{% if fieldEventCta %}
{{ fieldEventCta | removeUnderscores | capitalize }}
{% endif %}
</a>
</p>
{% endif %}

{% if fieldAdditionalInformationAbo %}
<p class="vads-u-margin--0">{{ fieldAdditionalInformationAbo.processed | phoneLinks }}</p>
{% endif %}
Expand Down
4 changes: 4 additions & 0 deletions src/site/stages/build/drupal/graphql/nodeEvent.graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ const nodeEvent = `
fieldDescription
fieldEventCost
fieldEventCta
fieldCtaEmail
fieldHowToSignUp
fieldEventRegistrationrequired
fieldFacilityLocation {
entity {
Expand Down Expand Up @@ -248,6 +250,8 @@ const nodeEventWithoutBreadcrumbs = `
fieldDescription
fieldEventCost
fieldEventCta
fieldCtaEmail
fieldHowToSignUp
fieldEventRegistrationrequired
fieldFacilityLocation {
entity {
Expand Down

0 comments on commit 5f52c8b

Please sign in to comment.