We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Engineering: Front-end - Eligibility Start page design: Redesign to a single-column design. Add media list.
- For both Mobile and Desktop, redesign the page to a two-column vertical design. 
- Redesign the 3-icon content page to be a 2-icon page and add the new bullet points of copy.
- Establish Mobile/Tablet width margins
- Make sure H1 font size is correct
<img width="1512" alt="image" src="https://user-images.githubusercontent.com/3673236/172735521-c7b6760b-832d-448e-b45e-20f217debccb.png">
<img width="453" alt="image" src="https://user-images.githubusercontent.com/3673236/172735548-a9c6ed1f-23fd-4904-8e9f-629f6bf2eba1.png">



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `benefits/eligibility/views.py`
Content:
```
1 """
2 The eligibility application: view definitions for the eligibility verification flow.
3 """
4 from django.conf import settings
5 from django.contrib import messages
6 from django.shortcuts import redirect
7 from django.template.response import TemplateResponse
8 from django.urls import reverse
9 from django.utils.decorators import decorator_from_middleware
10 from django.utils.translation import pgettext, gettext as _
11 
12 from benefits.core import recaptcha, session, viewmodels
13 from benefits.core.middleware import AgencySessionRequired, LoginRequired, RateLimit, VerifierSessionRequired
14 from benefits.core.models import EligibilityVerifier
15 from benefits.core.views import PageTemplateResponse
16 from . import analytics, api, forms
17 
18 
19 @decorator_from_middleware(AgencySessionRequired)
20 def index(request):
21     """View handler for the eligibility verifier selection form."""
22 
23     session.update(request, eligibility_types=[], origin=reverse("eligibility:index"))
24     agency = session.agency(request)
25 
26     eligibility_start = reverse("eligibility:start")
27 
28     page = viewmodels.Page(
29         title=_("eligibility.pages.index.title"),
30         content_title=_("eligibility.pages.index.content_title"),
31         forms=forms.EligibilityVerifierSelectionForm(agency=agency),
32     )
33 
34     if request.method == "POST":
35         form = forms.EligibilityVerifierSelectionForm(data=request.POST, agency=agency)
36 
37         if form.is_valid():
38             verifier_id = form.cleaned_data.get("verifier")
39             verifier = EligibilityVerifier.objects.get(id=verifier_id)
40             session.update(request, verifier=verifier)
41 
42             response = redirect(eligibility_start)
43         else:
44             # form was not valid, allow for correction/resubmission
45             page.forms = [form]
46             response = PageTemplateResponse(request, page)
47     else:
48         if agency.eligibility_verifiers.count() == 1:
49             verifier = agency.eligibility_verifiers.first()
50             session.update(request, verifier=verifier)
51             response = redirect(eligibility_start)
52         else:
53             response = PageTemplateResponse(request, page)
54 
55     return response
56 
57 
58 @decorator_from_middleware(AgencySessionRequired)
59 @decorator_from_middleware(VerifierSessionRequired)
60 def start(request):
61     """View handler for the eligibility verification getting started screen."""
62 
63     session.update(request, eligibility_types=[], origin=reverse("eligibility:start"))
64     verifier = session.verifier(request)
65 
66     button = viewmodels.Button.primary(text=_("eligibility.buttons.continue"), url=reverse("eligibility:confirm"))
67 
68     payment_options_link = f"{reverse('core:help')}#payment-options"
69     media = [
70         dict(
71             icon=viewmodels.Icon("idcardcheck", pgettext("image alt text", "core.icons.idcardcheck")),
72             heading=_(verifier.start_item_name),
73             details=_(verifier.start_item_description),
74         ),
75         dict(
76             icon=viewmodels.Icon("bankcardcheck", pgettext("image alt text", "core.icons.bankcardcheck")),
77             heading=_("eligibility.pages.start.bankcard.title"),
78             details=_("eligibility.pages.start.bankcard.text"),
79             links=[
80                 viewmodels.Button.link(
81                     classes="btn-text btn-link",
82                     text=_("eligibility.pages.start.bankcard.button[0].link"),
83                     url=payment_options_link,
84                 ),
85                 viewmodels.Button.link(
86                     classes="btn-text btn-link",
87                     text=_("eligibility.pages.start.bankcard.button[1].link"),
88                     url=payment_options_link,
89                 ),
90             ],
91         ),
92     ]
93 
94     if verifier.requires_authentication:
95         if settings.OAUTH_CLIENT_NAME is None:
96             raise Exception("EligibilityVerifier requires authentication, but OAUTH_CLIENT_NAME is None")
97 
98         oauth_help_link = f"{reverse('core:help')}#login-gov"
99 
100         media.insert(
101             0,
102             dict(
103                 icon=viewmodels.Icon("idscreencheck", pgettext("image alt text", "core.icons.idscreencheck")),
104                 heading=_("eligibility.pages.start.oauth.heading"),
105                 details=_("eligibility.pages.start.oauth.details"),
106                 links=[
107                     viewmodels.Button.link(
108                         classes="btn-text btn-link",
109                         text=_("eligibility.pages.start.oauth.link_text"),
110                         url=oauth_help_link,
111                         rel="noopener noreferrer",
112                     )
113                 ],
114             ),
115         )
116 
117         if not session.logged_in(request):
118             button = viewmodels.Button.login(
119                 label=_(verifier.auth_provider.sign_in_button_label),
120                 text="",
121                 url=reverse("oauth:login"),
122             )
123 
124     page = viewmodels.Page(
125         title=_("eligibility.pages.start.title"),
126         noimage=True,
127         paragraphs=[_(verifier.start_blurb)],
128         button=button,
129     )
130 
131     ctx = page.context_dict()
132     ctx["title"] = _(verifier.start_content_title)
133     ctx["media"] = media
134 
135     return TemplateResponse(request, "eligibility/start.html", ctx)
136 
137 
138 @decorator_from_middleware(AgencySessionRequired)
139 @decorator_from_middleware(LoginRequired)
140 @decorator_from_middleware(RateLimit)
141 @decorator_from_middleware(VerifierSessionRequired)
142 def confirm(request):
143     """View handler for the eligibility verification form."""
144 
145     template = "eligibility/confirm.html"
146     verifier = session.verifier(request)
147 
148     page = viewmodels.Page(
149         title=_(verifier.form_title),
150         content_title=_(verifier.form_content_title),
151         paragraphs=[_(verifier.form_blurb)],
152         form=forms.EligibilityVerificationForm(auto_id=True, label_suffix="", verifier=verifier),
153         classes="text-lg-center",
154     )
155 
156     # POST form submission, process form data
157     if request.method == "POST":
158         analytics.started_eligibility(request)
159 
160         form = forms.EligibilityVerificationForm(data=request.POST, verifier=verifier)
161 
162         # form was not valid, allow for correction/resubmission
163         if not form.is_valid():
164             if recaptcha.has_error(form):
165                 messages.error(request, "Recaptcha failed. Please try again.")
166 
167             page.forms = [form]
168             return TemplateResponse(request, template, page.context_dict())
169 
170         # form is valid, make Eligibility Verification request to get the verified types
171         verified_types = api.get_verified_types(request, form)
172 
173         # form was not valid, allow for correction/resubmission
174         if verified_types is None:
175             analytics.returned_error(request, form.errors)
176             page.forms = [form]
177             return TemplateResponse(request, template, page.context_dict())
178         # no types were verified
179         elif len(verified_types) == 0:
180             return unverified(request)
181         # type(s) were verified
182         else:
183             return verified(request, verified_types)
184 
185     # GET from an already verified user, no need to verify again
186     elif session.eligible(request):
187         eligibility = session.eligibility(request)
188         return verified(request, [eligibility.name])
189     # GET from an unverified user, present the form
190     else:
191         return TemplateResponse(request, template, page.context_dict())
192 
193 
194 @decorator_from_middleware(AgencySessionRequired)
195 @decorator_from_middleware(LoginRequired)
196 def verified(request, verified_types):
197     """View handler for the verified eligibility page."""
198 
199     analytics.returned_success(request)
200 
201     session.update(request, eligibility_types=verified_types)
202 
203     return redirect("enrollment:index")
204 
205 
206 @decorator_from_middleware(AgencySessionRequired)
207 @decorator_from_middleware(LoginRequired)
208 @decorator_from_middleware(VerifierSessionRequired)
209 def unverified(request):
210     """View handler for the unverified eligibility page."""
211 
212     analytics.returned_fail(request)
213 
214     # tel: link to agency phone number
215     agency = session.agency(request)
216     buttons = viewmodels.Button.agency_contact_links(agency)
217     buttons.append(viewmodels.Button.home(request, _("core.buttons.retry")))
218 
219     verifier = session.verifier(request)
220 
221     page = viewmodels.Page(
222         title=_(verifier.unverified_title),
223         classes="with-agency-links",
224         content_title=_(verifier.unverified_content_title),
225         icon=viewmodels.Icon("idcardquestion", pgettext("image alt text", "core.icons.idcardquestion")),
226         paragraphs=[_(verifier.unverified_blurb), _("eligibility.pages.unverified.p[1]")],
227         buttons=buttons,
228     )
229 
230     return TemplateResponse(request, "eligibility/unverified.html", page.context_dict())
231
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/benefits/eligibility/views.py b/benefits/eligibility/views.py
--- a/benefits/eligibility/views.py
+++ b/benefits/eligibility/views.py
@@ -67,11 +67,6 @@
 
     payment_options_link = f"{reverse('core:help')}#payment-options"
     media = [
-        dict(
-            icon=viewmodels.Icon("idcardcheck", pgettext("image alt text", "core.icons.idcardcheck")),
-            heading=_(verifier.start_item_name),
-            details=_(verifier.start_item_description),
-        ),
         dict(
             icon=viewmodels.Icon("bankcardcheck", pgettext("image alt text", "core.icons.bankcardcheck")),
             heading=_("eligibility.pages.start.bankcard.title"),
@@ -96,11 +91,12 @@
             raise Exception("EligibilityVerifier requires authentication, but OAUTH_CLIENT_NAME is None")
 
         oauth_help_link = f"{reverse('core:help')}#login-gov"
+        oauth_help_more_link = f"{reverse('core:help')}#login-gov-verify-items"
 
         media.insert(
             0,
             dict(
-                icon=viewmodels.Icon("idscreencheck", pgettext("image alt text", "core.icons.idscreencheck")),
+                icon=viewmodels.Icon("idcardcheck", pgettext("image alt text", "core.icons.idcardcheck")),
                 heading=_("eligibility.pages.start.oauth.heading"),
                 details=_("eligibility.pages.start.oauth.details"),
                 links=[
@@ -109,18 +105,38 @@
                         text=_("eligibility.pages.start.oauth.link_text"),
                         url=oauth_help_link,
                         rel="noopener noreferrer",
-                    )
+                    ),
+                    viewmodels.Button.link(
+                        classes="btn-text btn-link",
+                        text=_("eligibility.pages.start.oauth.link_text[2]"),
+                        url=oauth_help_more_link,
+                        rel="noopener noreferrer",
+                    ),
+                ],
+                bullets=[
+                    _("eligibility.pages.start.oauth.required_items[0]"),
+                    _("eligibility.pages.start.oauth.required_items[1]"),
+                    _("eligibility.pages.start.oauth.required_items[2]"),
                 ],
             ),
         )
 
         if not session.logged_in(request):
             button = viewmodels.Button.login(
-                label=_(verifier.auth_provider.sign_in_button_label),
-                text="",
+                text=_(verifier.auth_provider.sign_in_button_label),
                 url=reverse("oauth:login"),
             )
 
+    else:
+        media.insert(
+            0,
+            dict(
+                icon=viewmodels.Icon("idcardcheck", pgettext("image alt text", "core.icons.idcardcheck")),
+                heading=_(verifier.start_item_name),
+                details=_(verifier.start_item_description),
+            ),
+        )
+
     page = viewmodels.Page(
         title=_("eligibility.pages.start.title"),
         noimage=True,

{"golden_diff": "diff --git a/benefits/eligibility/views.py b/benefits/eligibility/views.py\n--- a/benefits/eligibility/views.py\n+++ b/benefits/eligibility/views.py\n@@ -67,11 +67,6 @@\n \n     payment_options_link = f\"{reverse('core:help')}#payment-options\"\n     media = [\n-        dict(\n-            icon=viewmodels.Icon(\"idcardcheck\", pgettext(\"image alt text\", \"core.icons.idcardcheck\")),\n-            heading=_(verifier.start_item_name),\n-            details=_(verifier.start_item_description),\n-        ),\n         dict(\n             icon=viewmodels.Icon(\"bankcardcheck\", pgettext(\"image alt text\", \"core.icons.bankcardcheck\")),\n             heading=_(\"eligibility.pages.start.bankcard.title\"),\n@@ -96,11 +91,12 @@\n             raise Exception(\"EligibilityVerifier requires authentication, but OAUTH_CLIENT_NAME is None\")\n \n         oauth_help_link = f\"{reverse('core:help')}#login-gov\"\n+        oauth_help_more_link = f\"{reverse('core:help')}#login-gov-verify-items\"\n \n         media.insert(\n             0,\n             dict(\n-                icon=viewmodels.Icon(\"idscreencheck\", pgettext(\"image alt text\", \"core.icons.idscreencheck\")),\n+                icon=viewmodels.Icon(\"idcardcheck\", pgettext(\"image alt text\", \"core.icons.idcardcheck\")),\n                 heading=_(\"eligibility.pages.start.oauth.heading\"),\n                 details=_(\"eligibility.pages.start.oauth.details\"),\n                 links=[\n@@ -109,18 +105,38 @@\n                         text=_(\"eligibility.pages.start.oauth.link_text\"),\n                         url=oauth_help_link,\n                         rel=\"noopener noreferrer\",\n-                    )\n+                    ),\n+                    viewmodels.Button.link(\n+                        classes=\"btn-text btn-link\",\n+                        text=_(\"eligibility.pages.start.oauth.link_text[2]\"),\n+                        url=oauth_help_more_link,\n+                        rel=\"noopener noreferrer\",\n+                    ),\n+                ],\n+                bullets=[\n+                    _(\"eligibility.pages.start.oauth.required_items[0]\"),\n+                    _(\"eligibility.pages.start.oauth.required_items[1]\"),\n+                    _(\"eligibility.pages.start.oauth.required_items[2]\"),\n                 ],\n             ),\n         )\n \n         if not session.logged_in(request):\n             button = viewmodels.Button.login(\n-                label=_(verifier.auth_provider.sign_in_button_label),\n-                text=\"\",\n+                text=_(verifier.auth_provider.sign_in_button_label),\n                 url=reverse(\"oauth:login\"),\n             )\n \n+    else:\n+        media.insert(\n+            0,\n+            dict(\n+                icon=viewmodels.Icon(\"idcardcheck\", pgettext(\"image alt text\", \"core.icons.idcardcheck\")),\n+                heading=_(verifier.start_item_name),\n+                details=_(verifier.start_item_description),\n+            ),\n+        )\n+\n     page = viewmodels.Page(\n         title=_(\"eligibility.pages.start.title\"),\n         noimage=True,\n", "issue": "Engineering: Front-end - Eligibility Start page design: Redesign to a single-column design. Add media list.\n- For both Mobile and Desktop, redesign the page to a two-column vertical design. \r\n- Redesign the 3-icon content page to be a 2-icon page and add the new bullet points of copy.\r\n- Establish Mobile/Tablet width margins\r\n- Make sure H1 font size is correct\r\n<img width=\"1512\" alt=\"image\" src=\"https://user-images.githubusercontent.com/3673236/172735521-c7b6760b-832d-448e-b45e-20f217debccb.png\">\r\n<img width=\"453\" alt=\"image\" src=\"https://user-images.githubusercontent.com/3673236/172735548-a9c6ed1f-23fd-4904-8e9f-629f6bf2eba1.png\">\r\n\r\n\n", "before_files": [{"content": "\"\"\"\nThe eligibility application: view definitions for the eligibility verification flow.\n\"\"\"\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.urls import reverse\nfrom django.utils.decorators import decorator_from_middleware\nfrom django.utils.translation import pgettext, gettext as _\n\nfrom benefits.core import recaptcha, session, viewmodels\nfrom benefits.core.middleware import AgencySessionRequired, LoginRequired, RateLimit, VerifierSessionRequired\nfrom benefits.core.models import EligibilityVerifier\nfrom benefits.core.views import PageTemplateResponse\nfrom . import analytics, api, forms\n\n\n@decorator_from_middleware(AgencySessionRequired)\ndef index(request):\n    \"\"\"View handler for the eligibility verifier selection form.\"\"\"\n\n    session.update(request, eligibility_types=[], origin=reverse(\"eligibility:index\"))\n    agency = session.agency(request)\n\n    eligibility_start = reverse(\"eligibility:start\")\n\n    page = viewmodels.Page(\n        title=_(\"eligibility.pages.index.title\"),\n        content_title=_(\"eligibility.pages.index.content_title\"),\n        forms=forms.EligibilityVerifierSelectionForm(agency=agency),\n    )\n\n    if request.method == \"POST\":\n        form = forms.EligibilityVerifierSelectionForm(data=request.POST, agency=agency)\n\n        if form.is_valid():\n            verifier_id = form.cleaned_data.get(\"verifier\")\n            verifier = EligibilityVerifier.objects.get(id=verifier_id)\n            session.update(request, verifier=verifier)\n\n            response = redirect(eligibility_start)\n        else:\n            # form was not valid, allow for correction/resubmission\n            page.forms = [form]\n            response = PageTemplateResponse(request, page)\n    else:\n        if agency.eligibility_verifiers.count() == 1:\n            verifier = agency.eligibility_verifiers.first()\n            session.update(request, verifier=verifier)\n            response = redirect(eligibility_start)\n        else:\n            response = PageTemplateResponse(request, page)\n\n    return response\n\n\n@decorator_from_middleware(AgencySessionRequired)\n@decorator_from_middleware(VerifierSessionRequired)\ndef start(request):\n    \"\"\"View handler for the eligibility verification getting started screen.\"\"\"\n\n    session.update(request, eligibility_types=[], origin=reverse(\"eligibility:start\"))\n    verifier = session.verifier(request)\n\n    button = viewmodels.Button.primary(text=_(\"eligibility.buttons.continue\"), url=reverse(\"eligibility:confirm\"))\n\n    payment_options_link = f\"{reverse('core:help')}#payment-options\"\n    media = [\n        dict(\n            icon=viewmodels.Icon(\"idcardcheck\", pgettext(\"image alt text\", \"core.icons.idcardcheck\")),\n            heading=_(verifier.start_item_name),\n            details=_(verifier.start_item_description),\n        ),\n        dict(\n            icon=viewmodels.Icon(\"bankcardcheck\", pgettext(\"image alt text\", \"core.icons.bankcardcheck\")),\n            heading=_(\"eligibility.pages.start.bankcard.title\"),\n            details=_(\"eligibility.pages.start.bankcard.text\"),\n            links=[\n                viewmodels.Button.link(\n                    classes=\"btn-text btn-link\",\n                    text=_(\"eligibility.pages.start.bankcard.button[0].link\"),\n                    url=payment_options_link,\n                ),\n                viewmodels.Button.link(\n                    classes=\"btn-text btn-link\",\n                    text=_(\"eligibility.pages.start.bankcard.button[1].link\"),\n                    url=payment_options_link,\n                ),\n            ],\n        ),\n    ]\n\n    if verifier.requires_authentication:\n        if settings.OAUTH_CLIENT_NAME is None:\n            raise Exception(\"EligibilityVerifier requires authentication, but OAUTH_CLIENT_NAME is None\")\n\n        oauth_help_link = f\"{reverse('core:help')}#login-gov\"\n\n        media.insert(\n            0,\n            dict(\n                icon=viewmodels.Icon(\"idscreencheck\", pgettext(\"image alt text\", \"core.icons.idscreencheck\")),\n                heading=_(\"eligibility.pages.start.oauth.heading\"),\n                details=_(\"eligibility.pages.start.oauth.details\"),\n                links=[\n                    viewmodels.Button.link(\n                        classes=\"btn-text btn-link\",\n                        text=_(\"eligibility.pages.start.oauth.link_text\"),\n                        url=oauth_help_link,\n                        rel=\"noopener noreferrer\",\n                    )\n                ],\n            ),\n        )\n\n        if not session.logged_in(request):\n            button = viewmodels.Button.login(\n                label=_(verifier.auth_provider.sign_in_button_label),\n                text=\"\",\n                url=reverse(\"oauth:login\"),\n            )\n\n    page = viewmodels.Page(\n        title=_(\"eligibility.pages.start.title\"),\n        noimage=True,\n        paragraphs=[_(verifier.start_blurb)],\n        button=button,\n    )\n\n    ctx = page.context_dict()\n    ctx[\"title\"] = _(verifier.start_content_title)\n    ctx[\"media\"] = media\n\n    return TemplateResponse(request, \"eligibility/start.html\", ctx)\n\n\n@decorator_from_middleware(AgencySessionRequired)\n@decorator_from_middleware(LoginRequired)\n@decorator_from_middleware(RateLimit)\n@decorator_from_middleware(VerifierSessionRequired)\ndef confirm(request):\n    \"\"\"View handler for the eligibility verification form.\"\"\"\n\n    template = \"eligibility/confirm.html\"\n    verifier = session.verifier(request)\n\n    page = viewmodels.Page(\n        title=_(verifier.form_title),\n        content_title=_(verifier.form_content_title),\n        paragraphs=[_(verifier.form_blurb)],\n        form=forms.EligibilityVerificationForm(auto_id=True, label_suffix=\"\", verifier=verifier),\n        classes=\"text-lg-center\",\n    )\n\n    # POST form submission, process form data\n    if request.method == \"POST\":\n        analytics.started_eligibility(request)\n\n        form = forms.EligibilityVerificationForm(data=request.POST, verifier=verifier)\n\n        # form was not valid, allow for correction/resubmission\n        if not form.is_valid():\n            if recaptcha.has_error(form):\n                messages.error(request, \"Recaptcha failed. Please try again.\")\n\n            page.forms = [form]\n            return TemplateResponse(request, template, page.context_dict())\n\n        # form is valid, make Eligibility Verification request to get the verified types\n        verified_types = api.get_verified_types(request, form)\n\n        # form was not valid, allow for correction/resubmission\n        if verified_types is None:\n            analytics.returned_error(request, form.errors)\n            page.forms = [form]\n            return TemplateResponse(request, template, page.context_dict())\n        # no types were verified\n        elif len(verified_types) == 0:\n            return unverified(request)\n        # type(s) were verified\n        else:\n            return verified(request, verified_types)\n\n    # GET from an already verified user, no need to verify again\n    elif session.eligible(request):\n        eligibility = session.eligibility(request)\n        return verified(request, [eligibility.name])\n    # GET from an unverified user, present the form\n    else:\n        return TemplateResponse(request, template, page.context_dict())\n\n\n@decorator_from_middleware(AgencySessionRequired)\n@decorator_from_middleware(LoginRequired)\ndef verified(request, verified_types):\n    \"\"\"View handler for the verified eligibility page.\"\"\"\n\n    analytics.returned_success(request)\n\n    session.update(request, eligibility_types=verified_types)\n\n    return redirect(\"enrollment:index\")\n\n\n@decorator_from_middleware(AgencySessionRequired)\n@decorator_from_middleware(LoginRequired)\n@decorator_from_middleware(VerifierSessionRequired)\ndef unverified(request):\n    \"\"\"View handler for the unverified eligibility page.\"\"\"\n\n    analytics.returned_fail(request)\n\n    # tel: link to agency phone number\n    agency = session.agency(request)\n    buttons = viewmodels.Button.agency_contact_links(agency)\n    buttons.append(viewmodels.Button.home(request, _(\"core.buttons.retry\")))\n\n    verifier = session.verifier(request)\n\n    page = viewmodels.Page(\n        title=_(verifier.unverified_title),\n        classes=\"with-agency-links\",\n        content_title=_(verifier.unverified_content_title),\n        icon=viewmodels.Icon(\"idcardquestion\", pgettext(\"image alt text\", \"core.icons.idcardquestion\")),\n        paragraphs=[_(verifier.unverified_blurb), _(\"eligibility.pages.unverified.p[1]\")],\n        buttons=buttons,\n    )\n\n    return TemplateResponse(request, \"eligibility/unverified.html\", page.context_dict())\n", "path": "benefits/eligibility/views.py"}], "after_files": [{"content": "\"\"\"\nThe eligibility application: view definitions for the eligibility verification flow.\n\"\"\"\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.shortcuts import redirect\nfrom django.template.response import TemplateResponse\nfrom django.urls import reverse\nfrom django.utils.decorators import decorator_from_middleware\nfrom django.utils.translation import pgettext, gettext as _\n\nfrom benefits.core import recaptcha, session, viewmodels\nfrom benefits.core.middleware import AgencySessionRequired, LoginRequired, RateLimit, VerifierSessionRequired\nfrom benefits.core.models import EligibilityVerifier\nfrom benefits.core.views import PageTemplateResponse\nfrom . import analytics, api, forms\n\n\n@decorator_from_middleware(AgencySessionRequired)\ndef index(request):\n    \"\"\"View handler for the eligibility verifier selection form.\"\"\"\n\n    session.update(request, eligibility_types=[], origin=reverse(\"eligibility:index\"))\n    agency = session.agency(request)\n\n    eligibility_start = reverse(\"eligibility:start\")\n\n    page = viewmodels.Page(\n        title=_(\"eligibility.pages.index.title\"),\n        content_title=_(\"eligibility.pages.index.content_title\"),\n        forms=forms.EligibilityVerifierSelectionForm(agency=agency),\n    )\n\n    if request.method == \"POST\":\n        form = forms.EligibilityVerifierSelectionForm(data=request.POST, agency=agency)\n\n        if form.is_valid():\n            verifier_id = form.cleaned_data.get(\"verifier\")\n            verifier = EligibilityVerifier.objects.get(id=verifier_id)\n            session.update(request, verifier=verifier)\n\n            response = redirect(eligibility_start)\n        else:\n            # form was not valid, allow for correction/resubmission\n            page.forms = [form]\n            response = PageTemplateResponse(request, page)\n    else:\n        if agency.eligibility_verifiers.count() == 1:\n            verifier = agency.eligibility_verifiers.first()\n            session.update(request, verifier=verifier)\n            response = redirect(eligibility_start)\n        else:\n            response = PageTemplateResponse(request, page)\n\n    return response\n\n\n@decorator_from_middleware(AgencySessionRequired)\n@decorator_from_middleware(VerifierSessionRequired)\ndef start(request):\n    \"\"\"View handler for the eligibility verification getting started screen.\"\"\"\n\n    session.update(request, eligibility_types=[], origin=reverse(\"eligibility:start\"))\n    verifier = session.verifier(request)\n\n    button = viewmodels.Button.primary(text=_(\"eligibility.buttons.continue\"), url=reverse(\"eligibility:confirm\"))\n\n    payment_options_link = f\"{reverse('core:help')}#payment-options\"\n    media = [\n        dict(\n            icon=viewmodels.Icon(\"bankcardcheck\", pgettext(\"image alt text\", \"core.icons.bankcardcheck\")),\n            heading=_(\"eligibility.pages.start.bankcard.title\"),\n            details=_(\"eligibility.pages.start.bankcard.text\"),\n            links=[\n                viewmodels.Button.link(\n                    classes=\"btn-text btn-link\",\n                    text=_(\"eligibility.pages.start.bankcard.button[0].link\"),\n                    url=payment_options_link,\n                ),\n                viewmodels.Button.link(\n                    classes=\"btn-text btn-link\",\n                    text=_(\"eligibility.pages.start.bankcard.button[1].link\"),\n                    url=payment_options_link,\n                ),\n            ],\n        ),\n    ]\n\n    if verifier.requires_authentication:\n        if settings.OAUTH_CLIENT_NAME is None:\n            raise Exception(\"EligibilityVerifier requires authentication, but OAUTH_CLIENT_NAME is None\")\n\n        oauth_help_link = f\"{reverse('core:help')}#login-gov\"\n        oauth_help_more_link = f\"{reverse('core:help')}#login-gov-verify-items\"\n\n        media.insert(\n            0,\n            dict(\n                icon=viewmodels.Icon(\"idcardcheck\", pgettext(\"image alt text\", \"core.icons.idcardcheck\")),\n                heading=_(\"eligibility.pages.start.oauth.heading\"),\n                details=_(\"eligibility.pages.start.oauth.details\"),\n                links=[\n                    viewmodels.Button.link(\n                        classes=\"btn-text btn-link\",\n                        text=_(\"eligibility.pages.start.oauth.link_text\"),\n                        url=oauth_help_link,\n                        rel=\"noopener noreferrer\",\n                    ),\n                    viewmodels.Button.link(\n                        classes=\"btn-text btn-link\",\n                        text=_(\"eligibility.pages.start.oauth.link_text[2]\"),\n                        url=oauth_help_more_link,\n                        rel=\"noopener noreferrer\",\n                    ),\n                ],\n                bullets=[\n                    _(\"eligibility.pages.start.oauth.required_items[0]\"),\n                    _(\"eligibility.pages.start.oauth.required_items[1]\"),\n                    _(\"eligibility.pages.start.oauth.required_items[2]\"),\n                ],\n            ),\n        )\n\n        if not session.logged_in(request):\n            button = viewmodels.Button.login(\n                text=_(verifier.auth_provider.sign_in_button_label),\n                url=reverse(\"oauth:login\"),\n            )\n\n    else:\n        media.insert(\n            0,\n            dict(\n                icon=viewmodels.Icon(\"idcardcheck\", pgettext(\"image alt text\", \"core.icons.idcardcheck\")),\n                heading=_(verifier.start_item_name),\n                details=_(verifier.start_item_description),\n            ),\n        )\n\n    page = viewmodels.Page(\n        title=_(\"eligibility.pages.start.title\"),\n        noimage=True,\n        paragraphs=[_(verifier.start_blurb)],\n        button=button,\n    )\n\n    ctx = page.context_dict()\n    ctx[\"title\"] = _(verifier.start_content_title)\n    ctx[\"media\"] = media\n\n    return TemplateResponse(request, \"eligibility/start.html\", ctx)\n\n\n@decorator_from_middleware(AgencySessionRequired)\n@decorator_from_middleware(LoginRequired)\n@decorator_from_middleware(RateLimit)\n@decorator_from_middleware(VerifierSessionRequired)\ndef confirm(request):\n    \"\"\"View handler for the eligibility verification form.\"\"\"\n\n    template = \"eligibility/confirm.html\"\n    verifier = session.verifier(request)\n\n    page = viewmodels.Page(\n        title=_(verifier.form_title),\n        content_title=_(verifier.form_content_title),\n        paragraphs=[_(verifier.form_blurb)],\n        form=forms.EligibilityVerificationForm(auto_id=True, label_suffix=\"\", verifier=verifier),\n        classes=\"text-lg-center\",\n    )\n\n    # POST form submission, process form data\n    if request.method == \"POST\":\n        analytics.started_eligibility(request)\n\n        form = forms.EligibilityVerificationForm(data=request.POST, verifier=verifier)\n\n        # form was not valid, allow for correction/resubmission\n        if not form.is_valid():\n            if recaptcha.has_error(form):\n                messages.error(request, \"Recaptcha failed. Please try again.\")\n\n            page.forms = [form]\n            return TemplateResponse(request, template, page.context_dict())\n\n        # form is valid, make Eligibility Verification request to get the verified types\n        verified_types = api.get_verified_types(request, form)\n\n        # form was not valid, allow for correction/resubmission\n        if verified_types is None:\n            analytics.returned_error(request, form.errors)\n            page.forms = [form]\n            return TemplateResponse(request, template, page.context_dict())\n        # no types were verified\n        elif len(verified_types) == 0:\n            return unverified(request)\n        # type(s) were verified\n        else:\n            return verified(request, verified_types)\n\n    # GET from an already verified user, no need to verify again\n    elif session.eligible(request):\n        eligibility = session.eligibility(request)\n        return verified(request, [eligibility.name])\n    # GET from an unverified user, present the form\n    else:\n        return TemplateResponse(request, template, page.context_dict())\n\n\n@decorator_from_middleware(AgencySessionRequired)\n@decorator_from_middleware(LoginRequired)\ndef verified(request, verified_types):\n    \"\"\"View handler for the verified eligibility page.\"\"\"\n\n    analytics.returned_success(request)\n\n    session.update(request, eligibility_types=verified_types)\n\n    return redirect(\"enrollment:index\")\n\n\n@decorator_from_middleware(AgencySessionRequired)\n@decorator_from_middleware(LoginRequired)\n@decorator_from_middleware(VerifierSessionRequired)\ndef unverified(request):\n    \"\"\"View handler for the unverified eligibility page.\"\"\"\n\n    analytics.returned_fail(request)\n\n    # tel: link to agency phone number\n    agency = session.agency(request)\n    buttons = viewmodels.Button.agency_contact_links(agency)\n    buttons.append(viewmodels.Button.home(request, _(\"core.buttons.retry\")))\n\n    verifier = session.verifier(request)\n\n    page = viewmodels.Page(\n        title=_(verifier.unverified_title),\n        classes=\"with-agency-links\",\n        content_title=_(verifier.unverified_content_title),\n        icon=viewmodels.Icon(\"idcardquestion\", pgettext(\"image alt text\", \"core.icons.idcardquestion\")),\n        paragraphs=[_(verifier.unverified_blurb), _(\"eligibility.pages.unverified.p[1]\")],\n        buttons=buttons,\n    )\n\n    return TemplateResponse(request, \"eligibility/unverified.html\", page.context_dict())\n", "path": "benefits/eligibility/views.py"}]}