Skip to content

Commit

Permalink
fix(enrollment): fix changing languages on enrollment success
Browse files Browse the repository at this point in the history
  • Loading branch information
lalver1 committed Jun 24, 2024
1 parent 80a22c1 commit 64e4248
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions benefits/core/templates/core/includes/lang-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<form method="post" action="{% url "set_language" %}">
{% csrf_token %}
{% get_language_info for code as langinfo %}
<input name="next" type="hidden" value="{{ redirect_to }}" />
<input name="language" type="hidden" value="{{ code }}" />
<button class="btn btn-lg btn-outline-light" type="submit">{{ langinfo.name_local | capfirst }}</button>
</form>
Expand Down
3 changes: 2 additions & 1 deletion benefits/enrollment/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,4 +289,5 @@ def success(request):
session.update(request, origin=reverse(ROUTE_LOGGED_OUT))

analytics.returned_success(request, eligibility.group_id)
return TemplateResponse(request, eligibility.enrollment_success_template)
context = {"redirect_to": request.path}
return TemplateResponse(request, eligibility.enrollment_success_template, context)

0 comments on commit 64e4248

Please sign in to comment.