feat(course_page.html): add ?next= parameter to login/signup buttons on course page while logged out

This commit is contained in:
2026-03-12 14:22:48 +01:00
parent 0cd748a9eb
commit 2749c70cdd

View File

@@ -37,8 +37,9 @@
{# If the user is not authenticated, we can prompt them to log in or sign up. #}
<div class="not-prose mt-8 p-4 bg-blue-100 border-l-4 border-blue-500 text-blue-700">
<p>{% trans "You need to be logged in to access this course. Please log in or sign up to view the modules." %}</p>
<a href="{% url 'account_login' %}" class="mt-4 inline-block bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 transition">{% trans "Login" %}</a>
<a href="{% url 'account_signup' %}" class="mt-4 inline-block bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700 transition">{% trans "Sign Up" %}</a>
<a href="{% url 'account_login' %}?next={{ request.path }}" class="mt-4 inline-block bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 transition">{% trans "Login" %}</a>
<a href="{% url 'account_signup' %}?next={{ request.path }}" class="mt-4 inline-block bg-green-600 text-white px-4 py-2 rounded hover:bg-green-700 transition ml-2">{% trans "Sign Up" %}</a>
</div>
{% else %}
<div class="not-prose mt-8 p-4 bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700">