Skip to content

Commit 88e2f9e

Browse files
authored
Merge pull request #2066 from JANVI-CHATURVEDI/fix-getstarted-clean-final
Fix "Get Started" Button and Add Registration Sidebar
2 parents fe62871 + 5af2067 commit 88e2f9e

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

wger/core/templates/form_content.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,4 @@
2323
{% endblock %}
2424

2525

26-
<!--
27-
Sidebar
28-
-->
2926
{% block sidebar %}{% if sidebar %}{% include sidebar %}{% endif %}{% endblock %}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
{% load i18n static wger_extras crispy_forms_tags %}
3+
4+
5+
6+
{% block sidebar %}
7+
{% if user.is_anonymous %}
8+
<h4>{% trans "Already have an account?" %}</h4>
9+
<p>
10+
<a href="{% url 'core:user:login' %}">
11+
<span class="{% fa_class 'sign-in-alt' %}"></span>
12+
{% trans "Login" %}
13+
</a>
14+
</p>
15+
{% endif %}
16+
{% endblock %}
17+

wger/core/views/user.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ def registration(request):
284284
template_data['form'] = form
285285
template_data['title'] = _('Register')
286286

287+
# Add this line to use the new registration-specific sidebar
288+
template_data['sidebar'] = 'user/registration_sidebar.html'
289+
290+
287291
return render(request, 'form_content.html', template_data)
288292

289293

wger/software/templates/features.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ <h1 class="font-bebas-neue display-3 uppercase">
118118
href="{% if user.is_authenticated %}
119119
{% url 'core:index' %}
120120
{% else %}
121-
{% url 'core:user:login' %}
121+
{% url 'core:user:registration' %}
122122
{% endif %}">
123123
{% translate "Get Started" %}
124124
</a>

0 commit comments

Comments
 (0)