Browse Source

always provide #hidden-login-form for edge cases

Rafał Pitoń 9 years ago
parent
commit
0026f91e7e
1 changed files with 1 additions and 2 deletions
  1. 1 2
      misago/templates/misago/auth.html

+ 1 - 2
misago/templates/misago/auth.html

@@ -1,11 +1,10 @@
 {% load i18n %}
 {% load i18n %}
-{% if user.is_anonymous %}
 <form id="hidden-login-form" method="post" action="{% url LOGIN_URL %}" style="display: none;">
 <form id="hidden-login-form" method="post" action="{% url LOGIN_URL %}" style="display: none;">
   {% csrf_token %}
   {% csrf_token %}
   <input name="redirect_to" type="text">
   <input name="redirect_to" type="text">
   <input type="submit" id="signin-button" value="{% trans "Sign in" %}">
   <input type="submit" id="signin-button" value="{% trans "Sign in" %}">
 </form>
 </form>
-{% else %}
+{% if user.is_authenticated %}
 <form id="hidden-logout-form" method="post" action="{% url LOGOUT_URL %}" style="display: none;">
 <form id="hidden-logout-form" method="post" action="{% url LOGOUT_URL %}" style="display: none;">
   {% csrf_token %}
   {% csrf_token %}
   <input type="submit" id="signin-button" value="{% trans "Log out" %}">
   <input type="submit" id="signin-button" value="{% trans "Log out" %}">