Self hosted FLOSS fitness/workout, nutrition and weight tracker
Allow users to see the status of their email verification
Roland Geider0713d250d64c
diff --git a/wger/core/templates/template.html b/wger/core/templates/template.htmlindex ca86e881c..dc75da1e3 100644--- a/wger/core/templates/template.html+++ b/wger/core/templates/template.html@@ -49,8 +49,8 @@<link rel="stylesheet" type="text/css" href="{% static 'css/workout-manager.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'yarn/bootstrap-compiled.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap-custom.css' %}">- <link rel="stylesheet" type="text/css" href="{% static 'yarn/components-font-awesome/css/all.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'yarn/shariff/dist/shariff.min.css' %}">+ <link rel="stylesheet" type="text/css" href="{% static 'fontawesomefree/css/all.min.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'yarn/metrics-graphics/dist/metricsgraphics.css' %}"><link rel="stylesheet" type="text/css" href="{% static 'css/metricsgraphics-custom.css' %}">diff --git a/wger/core/templates/user/preferences.html b/wger/core/templates/user/preferences.htmlindex 7c0127c77..007318855 100644--- a/wger/core/templates/user/preferences.html+++ b/wger/core/templates/user/preferences.html@@ -13,6 +13,22 @@{% block sidebar %}+ {% if user.userprofile.email_verified %}+ <p>+ <span class="{% fa_class 'envelope-circle-check' %} text-success"></span>+ {% translate "Verified email" %}+ </p>+ {% else %}+ <p>+ <span class="{% fa_class 'envelope' %}"></span>+ {% translate "Unverified email" %}+ <br>+ <a href="{% url 'core:user:confirm-email' %}">{% translate "Send verification email" %}</a>+ </p>+ {% endif %}+ <p>+ <small class="text-muted">{% translate "You need to verify your email to contribute exercises" %}</small>+ </p>{% endblock %}diff --git a/wger/core/views/user.py b/wger/core/views/user.pyindex 5c9cc32f1..7ecd69be8 100644--- a/wger/core/views/user.py+++ b/wger/core/views/user.py@@ -307,8 +307,8 @@ def preferences(request):"""An overview of all user preferences"""- template_data = {}- template_data.update(csrf(request))+ context = {}+ context.update(csrf(request))redirect = False# Process the preferences form@@ -349,13 +349,13 @@ def preferences(request):else:redirect = False- template_data['form'] = form+ context['form'] = formif redirect:messages.success(request, _('Settings successfully updated'))return HttpResponseRedirect(reverse('core:user:preferences'))else:- return render(request, 'user/preferences.html', template_data)+ return render(request, 'user/preferences.html', context)class UserDeactivateView(