From c8c47ecf6691bfafd6e4646ec1ceffb7b1d46bb9 Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Tue, 8 Aug 2023 22:33:09 +0000 Subject: [PATCH 1/8] refactor(index): use modal-trigger-link for selector, add period=False --- benefits/core/templates/core/includes/modal-trigger-link.html | 4 +++- benefits/core/templates/core/index.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/benefits/core/templates/core/includes/modal-trigger-link.html b/benefits/core/templates/core/includes/modal-trigger-link.html index 1d78c7305..106a9f830 100644 --- a/benefits/core/templates/core/includes/modal-trigger-link.html +++ b/benefits/core/templates/core/includes/modal-trigger-link.html @@ -1,2 +1,4 @@ -{{ text }}. +{# djlint:off #} +{{ text }}{% if login %}{% endif %}{% if period %}.{% endif %} +{# djlint:on #} diff --git a/benefits/core/templates/core/index.html b/benefits/core/templates/core/index.html index 9394fffe5..2044a9714 100644 --- a/benefits/core/templates/core/index.html +++ b/benefits/core/templates/core/index.html @@ -11,6 +11,6 @@ {% block call-to-action %} {% translate "Choose your Provider" as trigger_text %} - {% include "core/includes/modal-trigger.html" with id="modal--agency-selector" classes="btn btn-lg btn-primary" text=trigger_text %} + {% include "core/includes/modal-trigger-link.html" with modal="modal--agency-selector" classes="btn btn-lg btn-primary" text=trigger_text period=False %} {% include "core/includes/modal--agency-selector.html" with id="modal--agency-selector" %} {% endblock call-to-action %} From d28c08d58d3f33e4af0fb4bc165fd20c957ce2cf Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Tue, 8 Aug 2023 21:06:41 +0000 Subject: [PATCH 2/8] refactor(elig-start): use modal-trigger-link for Login.gov, add login=True --- .../eligibility/includes/selection-label--senior.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html b/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html index 9c583d1a9..7a4c53729 100644 --- a/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html +++ b/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html @@ -8,11 +8,7 @@ {% block description %} {% translate "You must be 65 years or older. You will need to verify your identity with" %} - - - . + {% include "core/includes/modal-trigger-link.html" with classes="border-0 bg-transparent p-0" cssid="login" modal="modal--login-gov" login=True period=True %} {% include "eligibility/includes/modal--senior-help.html" with id="modal--login-gov" size="modal-lg" %} {% endblock description %} From 9fdfbbccf199a8cdacd365f8aea1304cc1070cae Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Tue, 8 Aug 2023 22:35:24 +0000 Subject: [PATCH 3/8] refactor(modals): add period=True for the rest of the modals --- .../eligibility/includes/media-item--bankcardcheck--start.html | 2 +- .../includes/media-item--idcardcheck--start--senior.html | 2 +- .../enrollment/includes/media-item--bankcardcheck--index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html b/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html index b05937954..a4c7562d5 100644 --- a/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html +++ b/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html @@ -15,7 +15,7 @@

{% translate "Your contactless card must be a debit or credit card by Visa or Mastercard." %} {% translate "Learn more about contactless cards" as trigger_text %} - {% include "core/includes/modal-trigger-link.html" with id="modal--contactless" text=trigger_text %} + {% include "core/includes/modal-trigger-link.html" with modal="modal--contactless" text=trigger_text period=True %}

diff --git a/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html b/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html index d252de14f..2bf664472 100644 --- a/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html +++ b/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html @@ -11,7 +11,7 @@

{% translate "You will be able to create an account using your email address if you do not already have one. We use your Login.gov account to verify your identity." %} {% translate "Learn more about identity verification" as trigger_text %} - {% include "core/includes/modal-trigger-link.html" with id="modal--identity-verification" text=trigger_text %} + {% include "core/includes/modal-trigger-link.html" with modal="modal--identity-verification" text=trigger_text period=True %}

{% translate "For this process you will need:" %}

diff --git a/benefits/enrollment/templates/enrollment/includes/media-item--bankcardcheck--index.html b/benefits/enrollment/templates/enrollment/includes/media-item--bankcardcheck--index.html index 4974b5f90..cc2f69077 100644 --- a/benefits/enrollment/templates/enrollment/includes/media-item--bankcardcheck--index.html +++ b/benefits/enrollment/templates/enrollment/includes/media-item--bankcardcheck--index.html @@ -14,8 +14,8 @@

{% translate "You will be directed to our payment partner, " %} - {% include "core/includes/modal-trigger-link.html" with id="modal--littlepay" text="Littlepay" %} {% translate "We don’t store your information, and you won’t be charged." %} + {% include "core/includes/modal-trigger-link.html" with modal="modal--littlepay" text="Littlepay" period=True %}

{% translate "Please use a debit or credit card by Visa or Mastercard." %}

From cd673e726648096bfd7caf8a636894bce7f984a0 Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Tue, 8 Aug 2023 21:07:54 +0000 Subject: [PATCH 4/8] refactor(trigger): rename cssId to just ID --- benefits/core/templates/core/includes/modal-trigger-link.html | 2 +- .../templates/eligibility/includes/selection-label--senior.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benefits/core/templates/core/includes/modal-trigger-link.html b/benefits/core/templates/core/includes/modal-trigger-link.html index 106a9f830..a58d35038 100644 --- a/benefits/core/templates/core/includes/modal-trigger-link.html +++ b/benefits/core/templates/core/includes/modal-trigger-link.html @@ -1,4 +1,4 @@ {# djlint:off #} -{{ text }}{% if login %}{% endif %}{% if period %}.{% endif %} +{{ text }}{% if login %}{% endif %}{% if period %}.{% endif %} {# djlint:on #} diff --git a/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html b/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html index 7a4c53729..c36e0b921 100644 --- a/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html +++ b/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html @@ -8,7 +8,7 @@ {% block description %} {% translate "You must be 65 years or older. You will need to verify your identity with" %} - {% include "core/includes/modal-trigger-link.html" with classes="border-0 bg-transparent p-0" cssid="login" modal="modal--login-gov" login=True period=True %} + {% include "core/includes/modal-trigger-link.html" with classes="border-0 bg-transparent p-0" id="login" modal="modal--login-gov" login=True period=True %} {% include "eligibility/includes/modal--senior-help.html" with id="modal--login-gov" size="modal-lg" %} {% endblock description %} From f112387024b77d40d6471b0bd755aeb8ef75c097 Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Tue, 8 Aug 2023 21:09:21 +0000 Subject: [PATCH 5/8] chore: rename files --- .../core/templates/core/includes/modal-trigger-link.html | 4 ---- benefits/core/templates/core/includes/modal-trigger.html | 6 ++++-- 2 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 benefits/core/templates/core/includes/modal-trigger-link.html diff --git a/benefits/core/templates/core/includes/modal-trigger-link.html b/benefits/core/templates/core/includes/modal-trigger-link.html deleted file mode 100644 index a58d35038..000000000 --- a/benefits/core/templates/core/includes/modal-trigger-link.html +++ /dev/null @@ -1,4 +0,0 @@ - -{# djlint:off #} -{{ text }}{% if login %}{% endif %}{% if period %}.{% endif %} -{# djlint:on #} diff --git a/benefits/core/templates/core/includes/modal-trigger.html b/benefits/core/templates/core/includes/modal-trigger.html index 4f3abef0b..a58d35038 100644 --- a/benefits/core/templates/core/includes/modal-trigger.html +++ b/benefits/core/templates/core/includes/modal-trigger.html @@ -1,2 +1,4 @@ - - + +{# djlint:off #} +{{ text }}{% if login %}{% endif %}{% if period %}.{% endif %} +{# djlint:on #} From c49d35f0cb0485089e6735ee472656b53a45e3e0 Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Tue, 8 Aug 2023 22:37:27 +0000 Subject: [PATCH 6/8] fix: fully rename file --- benefits/core/templates/core/index.html | 2 +- .../eligibility/includes/media-item--bankcardcheck--start.html | 2 +- .../includes/media-item--idcardcheck--start--senior.html | 2 +- .../templates/eligibility/includes/selection-label--senior.html | 2 +- .../enrollment/includes/media-item--bankcardcheck--index.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/benefits/core/templates/core/index.html b/benefits/core/templates/core/index.html index 2044a9714..64a0ecd84 100644 --- a/benefits/core/templates/core/index.html +++ b/benefits/core/templates/core/index.html @@ -11,6 +11,6 @@ {% block call-to-action %} {% translate "Choose your Provider" as trigger_text %} - {% include "core/includes/modal-trigger-link.html" with modal="modal--agency-selector" classes="btn btn-lg btn-primary" text=trigger_text period=False %} + {% include "core/includes/modal-trigger.html" with modal="modal--agency-selector" classes="btn btn-lg btn-primary" text=trigger_text period=False %} {% include "core/includes/modal--agency-selector.html" with id="modal--agency-selector" %} {% endblock call-to-action %} diff --git a/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html b/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html index a4c7562d5..a47433a40 100644 --- a/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html +++ b/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html @@ -15,7 +15,7 @@

{% translate "Your contactless card must be a debit or credit card by Visa or Mastercard." %} {% translate "Learn more about contactless cards" as trigger_text %} - {% include "core/includes/modal-trigger-link.html" with modal="modal--contactless" text=trigger_text period=True %} + {% include "core/includes/modal-trigger.html" with modal="modal--contactless" text=trigger_text period=True %}

diff --git a/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html b/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html index 2bf664472..d8881435b 100644 --- a/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html +++ b/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html @@ -11,7 +11,7 @@

{% translate "You will be able to create an account using your email address if you do not already have one. We use your Login.gov account to verify your identity." %} {% translate "Learn more about identity verification" as trigger_text %} - {% include "core/includes/modal-trigger-link.html" with modal="modal--identity-verification" text=trigger_text period=True %} + {% include "core/includes/modal-trigger.html" with modal="modal--identity-verification" text=trigger_text period=True %}

{% translate "For this process you will need:" %}

diff --git a/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html b/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html index c36e0b921..b7df3f413 100644 --- a/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html +++ b/benefits/eligibility/templates/eligibility/includes/selection-label--senior.html @@ -8,7 +8,7 @@ {% block description %} {% translate "You must be 65 years or older. You will need to verify your identity with" %} - {% include "core/includes/modal-trigger-link.html" with classes="border-0 bg-transparent p-0" id="login" modal="modal--login-gov" login=True period=True %} + {% include "core/includes/modal-trigger.html" with classes="border-0 bg-transparent p-0" id="login" modal="modal--login-gov" login=True period=True %} {% include "eligibility/includes/modal--senior-help.html" with id="modal--login-gov" size="modal-lg" %} {% endblock description %} diff --git a/benefits/enrollment/templates/enrollment/includes/media-item--bankcardcheck--index.html b/benefits/enrollment/templates/enrollment/includes/media-item--bankcardcheck--index.html index cc2f69077..16c76f2e4 100644 --- a/benefits/enrollment/templates/enrollment/includes/media-item--bankcardcheck--index.html +++ b/benefits/enrollment/templates/enrollment/includes/media-item--bankcardcheck--index.html @@ -15,7 +15,7 @@

{% translate "You will be directed to our payment partner, " %} {% translate "We don’t store your information, and you won’t be charged." %} - {% include "core/includes/modal-trigger-link.html" with modal="modal--littlepay" text="Littlepay" period=True %} + {% include "core/includes/modal-trigger.html" with modal="modal--littlepay" text="Littlepay" period=True %}

{% translate "Please use a debit or credit card by Visa or Mastercard." %}

From 8675331089a2dc7dba8007b6380a8489af328f06 Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Tue, 8 Aug 2023 22:39:03 +0000 Subject: [PATCH 7/8] fix: use the word text instead of trigger_text --- benefits/core/templates/core/index.html | 4 ++-- .../includes/media-item--bankcardcheck--start.html | 4 ++-- .../includes/media-item--idcardcheck--start--senior.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/benefits/core/templates/core/index.html b/benefits/core/templates/core/index.html index 64a0ecd84..cbc9af750 100644 --- a/benefits/core/templates/core/index.html +++ b/benefits/core/templates/core/index.html @@ -10,7 +10,7 @@ {% endblock headline %} {% block call-to-action %} - {% translate "Choose your Provider" as trigger_text %} - {% include "core/includes/modal-trigger.html" with modal="modal--agency-selector" classes="btn btn-lg btn-primary" text=trigger_text period=False %} + {% translate "Choose your Provider" as text %} + {% include "core/includes/modal-trigger.html" with modal="modal--agency-selector" classes="btn btn-lg btn-primary" text=text period=False %} {% include "core/includes/modal--agency-selector.html" with id="modal--agency-selector" %} {% endblock call-to-action %} diff --git a/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html b/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html index a47433a40..76f4cc6f3 100644 --- a/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html +++ b/benefits/eligibility/templates/eligibility/includes/media-item--bankcardcheck--start.html @@ -14,8 +14,8 @@

{% translate "Your contactless card must be a debit or credit card by Visa or Mastercard." %} - {% translate "Learn more about contactless cards" as trigger_text %} - {% include "core/includes/modal-trigger.html" with modal="modal--contactless" text=trigger_text period=True %} + {% translate "Learn more about contactless cards" as text %} + {% include "core/includes/modal-trigger.html" with modal="modal--contactless" text=text period=True %}

diff --git a/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html b/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html index d8881435b..dd3a89ee7 100644 --- a/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html +++ b/benefits/eligibility/templates/eligibility/includes/media-item--idcardcheck--start--senior.html @@ -10,8 +10,8 @@

{% translate "You will be able to create an account using your email address if you do not already have one. We use your Login.gov account to verify your identity." %} - {% translate "Learn more about identity verification" as trigger_text %} - {% include "core/includes/modal-trigger.html" with modal="modal--identity-verification" text=trigger_text period=True %} + {% translate "Learn more about identity verification" as text %} + {% include "core/includes/modal-trigger.html" with modal="modal--identity-verification" text=text period=True %}

{% translate "For this process you will need:" %}

From 3a54e8460d033006413d9ed3dcfa97f22923d3ee Mon Sep 17 00:00:00 2001 From: Machiko Yasuda Date: Tue, 8 Aug 2023 22:10:53 +0000 Subject: [PATCH 8/8] fix(modal-trigger): use Modal for HREF --- benefits/core/templates/core/includes/modal-trigger.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benefits/core/templates/core/includes/modal-trigger.html b/benefits/core/templates/core/includes/modal-trigger.html index a58d35038..44cbc7c5c 100644 --- a/benefits/core/templates/core/includes/modal-trigger.html +++ b/benefits/core/templates/core/includes/modal-trigger.html @@ -1,4 +1,4 @@ {# djlint:off #} -{{ text }}{% if login %}{% endif %}{% if period %}.{% endif %} +{{ text }}{% if login %}{% endif %}{% if period %}.{% endif %} {# djlint:on #}