Skip to content

Commit

Permalink
feat(enrollment): success page displays expiration date if any
Browse files Browse the repository at this point in the history
with the TIME_ZONE='America/Los_Angeles' setting, Django will display
the expiration date in that time zone

Django automatically formats the date according to the user's locale
(e.g. 'en' or 'es')

turned off djlint around this section because the different <p> tags in
branches of the {% if %} block was throwing errors and causing weird formatting"
  • Loading branch information
thekaveman committed Mar 26, 2024
1 parent 598c12f commit 90791bb
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions benefits/enrollment/templates/enrollment/success.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@ <h1 class="pb-lg-5 pb-4">{% translate "Success! Your transit benefit is now conn
<div class="col-12 col-sm-12 col-lg-9">
<div class="row flex-column-reverse flex-lg-row">
<div class="col-12 col-lg-7">
<p class="pt-lg-4 mt-lg-3">
{% block success-message %}
{% endblock success-message %}
</p>
{# djlint:off #}
{% if enrollment.supports_expiration %}
<h2 class="h3 mb-1">{% translate "Your benefit will expire on" %} {{ enrollment.expires|date }}.</h2>
<p>
{% else %}
<p class="pt-lg-4 mt-lg-3">
{% endif %}
{% block success-message %}
{% endblock success-message %}
</p>
{# djlint:on #}
<p class="pt-4">{% translate "Thank you for using Cal-ITP Benefits!" %}</p>
</div>
<div class="col-12 col-lg-5">
Expand Down

0 comments on commit 90791bb

Please sign in to comment.