Commit 032eb8f0 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg

🐛 Fix problem that prevented errors from being shown in the profile edit form

parent 661d107a
This diff was suppressed by a .gitattributes entry.
......@@ -14,6 +14,13 @@
</div>
{% endif %}
{% if form.errors %}
<div class="alert alert-error">
{% trans "Please check your profile for errors." %}
<button type="button" class="close"><span class="alert-icon-close"></span></button>
</div>
{% endif %}
<form method="post" class="form-horizontal span8 offset2">
{% csrf_token %}
......@@ -37,4 +44,4 @@
<input type="submit" value="{% trans 'save'|capfirst %}" class="btn btn-style1 pull-right login" />
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -143,9 +143,9 @@ def edit_profile(request):
form = MemberForm(request.POST, instance=member)
if form.is_valid():
saved = True
member = form.save()
form = MemberForm(instance=member)
form.save()
else:
form = MemberForm(instance=member)
return render(request, 'members/edit_profile.html',
{'form': form, 'saved': saved})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment