Skip to content

Commit

Permalink
refactor(error): all error pages now extend error
Browse files Browse the repository at this point in the history
  • Loading branch information
machikoyasuda committed Dec 11, 2024
1 parent 55a5f2b commit a4e2f7b
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 55 deletions.
32 changes: 18 additions & 14 deletions benefits/eligibility/templates/eligibility/unverified.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "core/base.html" %}
{% extends "error.html" %}
{% load i18n %}

{% block page-title %}
Expand All @@ -11,19 +11,23 @@
{% endif %}
{% endblock nav-buttons %}

{% block inner-content %}
<div class="col-lg-6">
<div class="mt-5 pt-4 text-center">{% include "core/includes/icon.html" with name="idcardquestion" %}</div>
<h1 class="h2 py-4">{% translate "Your eligibility could not be verified." %}</h1>
<p>
{% block unverified-body %}
{% translate "That’s okay! You may still be eligible for our program." %}
{% blocktranslate with short_name=agency.short_name %}Please reach out to {{ short_name }} for assistance.{% endblocktranslate %}
{% endblock unverified-body %}
</p>
{% include "core/includes/agency-links.html" %}
</div>
{% endblock inner-content %}
{% block icon %}
{% include "core/includes/icon.html" with name="idcardquestion" %}
{% endblock icon %}

{% block headline-text %}
{% translate "Your eligibility could not be verified." %}
{% endblock headline-text %}

{% block paragraphs %}
<p>
{% block unverified-body %}
{% translate "That’s okay! You may still be eligible for our program." %}
{% blocktranslate with short_name=agency.short_name %}Please reach out to {{ short_name }} for assistance.{% endblocktranslate %}
{% endblock unverified-body %}
</p>
{% include "core/includes/agency-links.html" %}
{% endblock paragraphs %}

{% block call-to-action-button %}
{% include "core/includes/button--index.html" %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "core/base.html" %}
{% extends "error.html" %}
{% load i18n %}

{% block page-title %}
Expand All @@ -11,14 +11,16 @@
{% endif %}
{% endblock nav-buttons %}

{% block inner-content %}
<div class="col-lg-6">
<div class="mt-5 pt-4 text-center">{% include "core/includes/icon.html" with name="calendarcheck" %}</div>
<h1 class="h2 py-4">{% translate "You are still enrolled in this benefit" %}</h1>
{% block paragraphs %}
{% endblock paragraphs %}
</div>
{% endblock inner-content %}
{% block icon %}
{% include "core/includes/icon.html" with name="calendarcheck" %}
{% endblock icon %}

{% block headline-text %}
{% translate "You are still enrolled in this benefit" %}
{% endblock headline-text %}

{% block paragraphs %}
{% endblock paragraphs %}

{% block call-to-action-button %}
{% include "core/includes/button--origin.html" %}
Expand Down
22 changes: 13 additions & 9 deletions benefits/enrollment/templates/enrollment/retry.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "core/base.html" %}
{% extends "error.html" %}
{% load i18n %}

{% block page-title %}
Expand All @@ -11,14 +11,18 @@
{% endif %}
{% endblock nav-buttons %}

{% block inner-content %}
<div class="col-lg-6">
<div class="mt-5 pt-4 text-center">{% include "core/includes/icon.html" with name="bankcardquestion" %}</div>
<h1 class="h2 py-4">{% translate "The card information may not have been entered correctly." %}</h1>
<p>{% translate "Please check the details on your card and try again, or contact your transit agency for help." %}</p>
{% include "core/includes/agency-links.html" %}
</div>
{% endblock inner-content %}
{% block icon %}
{% include "core/includes/icon.html" with name="bankcardquestion" %}
{% endblock icon %}

{% block headline-text %}
{% translate "The card information may not have been entered correctly." %}
{% endblock headline-text %}

{% block paragraphs %}
<p>{% translate "Please check the details on your card and try again, or contact your transit agency for help." %}</p>
{% include "core/includes/agency-links.html" %}
{% endblock paragraphs %}

{% block call-to-action-button %}
{% translate "Try again" as button_text %}
Expand Down
26 changes: 15 additions & 11 deletions benefits/enrollment/templates/enrollment/system_error.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{% extends "core/base.html" %}
{% extends "error.html" %}
{% load i18n %}

{% block page-title %}
{% translate "Enrollment system down" %}
{% endblock page-title %}

{% block inner-content %}
<div class="col-lg-6">
<div class="mt-5 pt-4 text-center">{% include "core/includes/icon.html" with name="bankcardquestion" %}</div>
<h1 class="h2 py-4">{% translate "Our enrollment system is not working right now." %}</h1>
<p>
{% translate "We’re working to solve the problem. Please wait 48 hours and try to enroll again, or contact your transit agency for help." %}
</p>
{% include "core/includes/agency-links.html" %}
</div>
{% endblock inner-content %}
{% block icon %}
{% include "core/includes/icon.html" with name="bankcardquestion" %}
{% endblock icon %}

{% block headline-text %}
{% translate "Our enrollment system is not working right now." %}
{% endblock headline-text %}

{% block paragraphs %}
<p>
{% translate "We’re working to solve the problem. Please wait 48 hours and try to enroll again, or contact your transit agency for help." %}
</p>
{% include "core/includes/agency-links.html" %}
{% endblock paragraphs %}

{% block call-to-action-button %}
{% if authentication and authentication.sign_out_link_template %}
Expand Down
26 changes: 15 additions & 11 deletions benefits/oauth/templates/oauth/system_error.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{% extends "core/base.html" %}
{% extends "error.html" %}
{% load i18n %}

{% block page-title %}
{% translate "Service is down" %}
{% endblock page-title %}

{% block inner-content %}
<div class="col-lg-6">
<div class="mt-5 pt-4 text-center">{% include "core/includes/icon.html" with name="sadbus" %}</div>
<h1 class="h2 py-4">{% translate "There was a problem with the service that checks your identity." %}</h1>
<p>
{% translate "We’re working to solve the problem. Please wait 24 hours and try to enroll again, or contact your transit agency for help." %}
{% include "core/includes/agency-links.html" %}
</p>
</div>
{% endblock inner-content %}
{% block icon %}
{% include "core/includes/icon.html" with name="sadbus" %}
{% endblock icon %}

{% block headline-text %}
{% translate "There was a problem with the service that checks your identity." %}
{% endblock headline-text %}

{% block paragraphs %}
<p>
{% translate "We’re working to solve the problem. Please wait 24 hours and try to enroll again, or contact your transit agency for help." %}
{% include "core/includes/agency-links.html" %}
</p>
{% endblock paragraphs %}

{% block call-to-action-button %}
{% include "core/includes/button--origin.html" %}
Expand Down
4 changes: 4 additions & 0 deletions benefits/templates/200-user-error.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
{% translate "Start over" %}
{% endblock title %}

{% block icon %}
{% include "core/includes/icon.html" with name="sadbus" %}
{% endblock icon %}

{% block headline-text %}
{% translate "You may have reached this page on accident." %}
{% endblock headline-text %}
Expand Down
4 changes: 4 additions & 0 deletions benefits/templates/400.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
{% translate "Service is down" %}
{% endblock title %}

{% block icon %}
{% include "core/includes/icon.html" with name="sadbus" %}
{% endblock icon %}

{% block headline-text %}
{% translate "Sorry! Service for this site is down." %}
{% endblock headline-text %}
Expand Down
4 changes: 4 additions & 0 deletions benefits/templates/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
{% translate "Page not found" %}
{% endblock title %}

{% block icon %}
{% include "core/includes/icon.html" with name="sadbus" %}
{% endblock icon %}

{% block headline-text %}
{% translate "Sorry! We can’t find that page." %}
{% endblock headline-text %}
Expand Down
4 changes: 4 additions & 0 deletions benefits/templates/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
{% translate "Service is down" %}
{% endblock title %}

{% block icon %}
{% include "core/includes/icon.html" with name="sadbus" %}
{% endblock icon %}

{% block headline-text %}
{% translate "We’re working on fixing a problem." %}
{% endblock headline-text %}
Expand Down
5 changes: 4 additions & 1 deletion benefits/templates/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

{% block inner-content %}
<div class="col-lg-6">
<div class="mt-5 pt-4 text-center">{% include "core/includes/icon.html" with name="sadbus" %}</div>
<div class="mt-5 pt-4 text-center">
{% block icon %}
{% endblock icon %}
</div>
<h1 class="h2 py-4">
{% block headline-text %}
{% endblock headline-text %}
Expand Down

0 comments on commit a4e2f7b

Please sign in to comment.