Skip to content

Commit 949d880

Browse files
committed
feat: implement agency-card-specific template for unverified view
the call-to-action takes the user back to the confirm form.
1 parent 701a781 commit 949d880

File tree

4 files changed

+29
-7
lines changed

4 files changed

+29
-7
lines changed

benefits/core/migrations/local_fixtures.json

+2
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@
187187
"selection_label_template": "eligibility/includes/selection-label--mst-courtesy-card.html",
188188
"start_template": "eligibility/start--mst-courtesy-card.html",
189189
"form_class": "benefits.eligibility.forms.MSTCourtesyCard",
190+
"unverified_template": "eligibility/unverified--agency-card.html",
190191
"help_template": "core/includes/help--mst-courtesy-card.html"
191192
}
192193
},
@@ -251,6 +252,7 @@
251252
"selection_label_template": "eligibility/includes/selection-label--sbmtd-mobility-pass.html",
252253
"start_template": "eligibility/start--sbmtd-mobility-pass.html",
253254
"form_class": "benefits.eligibility.forms.SBMTDMobilityPass",
255+
"unverified_template": "eligibility/unverified--agency-card.html",
254256
"help_template": "core/includes/help--sbmtd-mobility-pass.html"
255257
}
256258
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{% extends "eligibility/unverified.html" %}
2+
{% load i18n %}
3+
4+
{% block unverified-headline %}
5+
{% translate "Your card information may not have been entered correctly." %}
6+
{% endblock unverified-headline %}
7+
8+
{% block unverified-body %}
9+
{% translate "The number and last name must be entered exactly as they appear on your MST Courtesy Card. Please check your card and try again, or contact your transit agency for help." %}
10+
{% endblock unverified-body %}
11+
12+
{% block unverified-call-to-action %}
13+
{% translate "Try again" as button_text %}
14+
<div class="col-lg-3 col-8">{% include "core/includes/button--origin.html" with button_text=button_text %}</div>
15+
{% endblock unverified-call-to-action %}

benefits/eligibility/templates/eligibility/unverified.html

+11-7
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@
1212

1313
<div class="container">
1414
<h1 class="h2 text-center">
15-
<span class="icon d-block pb-5">
16-
{% include "core/includes/icon.html" with name="idcardquestion" %}
17-
</span>
18-
{% translate "Your eligibility could not be verified." %}
15+
<span class="icon d-block pb-5">{% include "core/includes/icon.html" with name="idcardquestion" %}</span>
16+
{% block unverified-headline %}
17+
{% translate "Your eligibility could not be verified." %}
18+
{% endblock unverified-headline %}
1919
</h1>
2020

2121
<div class="row justify-content-center">
2222
<div class="col-lg-8 pt-4">
2323
<p>
24-
{% translate "That’s okay! You may still be eligible for our program." %}
25-
{% blocktranslate with short_name=agency.short_name %}Please reach out to {{ short_name }} for assistance.{% endblocktranslate %}
24+
{% block unverified-body %}
25+
{% translate "That’s okay! You may still be eligible for our program." %}
26+
{% blocktranslate with short_name=agency.short_name %}Please reach out to {{ short_name }} for assistance.{% endblocktranslate %}
27+
{% endblock unverified-body %}
2628
</p>
2729
</div>
2830
</div>
@@ -32,7 +34,9 @@ <h1 class="h2 text-center">
3234
</div>
3335

3436
<div class="row pt-8 justify-content-center">
35-
<div class="col-lg-3 col-8">{% include "core/includes/button--index.html" %}</div>
37+
{% block unverified-call-to-action %}
38+
<div class="col-lg-3 col-8">{% include "core/includes/button--index.html" %}</div>
39+
{% endblock unverified-call-to-action %}
3640
</div>
3741

3842
</div>

benefits/eligibility/views.py

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def confirm(request):
118118

119119
# GET from an unverified user, present the form
120120
if request.method == "GET":
121+
session.update(request, origin=reverse(ROUTE_CONFIRM))
121122
return TemplateResponse(request, TEMPLATE_CONFIRM, context)
122123
# POST form submission, process form data, make Eligibility Verification API call
123124
elif request.method == "POST":

0 commit comments

Comments
 (0)