Skip to content

Commit

Permalink
refactor(enrollment): remove retry variable entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
machikoyasuda committed Nov 16, 2023
1 parent d93eec9 commit 39753d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 5 additions & 7 deletions benefits/enrollment/templates/enrollment/retry.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ <h1 class="h2 text-center">
<div class="col-lg-8">{% include "core/includes/agency-links.html" %}</div>
</div>

{% if retry_button %}
<div class="row pt-8 justify-content-center">
<div class="col-lg-3 col-8">
{% translate "Try again" as button_text %}
{% include "core/includes/button--origin.html" with button_text=button_text %}
</div>
<div class="row pt-8 justify-content-center">
<div class="col-lg-3 col-8">
{% translate "Try again" as button_text %}
{% include "core/includes/button--origin.html" with button_text=button_text %}
</div>
{% endif %}
</div>

</div>
{% endblock main-content %}
5 changes: 1 addition & 4 deletions benefits/enrollment/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ def retry(request):
analytics.returned_retry(request)
form = forms.CardTokenizeFailForm(request.POST)
if form.is_valid():
context = {
"retry_button": True,
}
return TemplateResponse(request, TEMPLATE_RETRY, context)
return TemplateResponse(request, TEMPLATE_RETRY)
else:
analytics.returned_error(request, "Invalid retry submission.")
raise Exception("Invalid retry submission.")
Expand Down

0 comments on commit 39753d5

Please sign in to comment.