Skip to content

Commit

Permalink
Abmeldung via POST, nicht mehr GET
Browse files Browse the repository at this point in the history
  • Loading branch information
gdmhrogut committed Feb 26, 2024
1 parent 40f11ac commit c1a21b4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions datenwerft/templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@
<a class="nav-link" href="https://geo.sv.rostock.de/impressum.html" target="_blank" rel="noopener noreferrer"><i class="fas fa-stamp"></i> Impressum</a>
</li>
</ul>
<form class="form-inline mt-2 mt-md-0">
{% if user.is_authenticated %}
<a class="btn btn-danger" role="button" href="{% url 'accounts:logout' %}"><i class="fas fa-right-from-bracket"></i> abmelden</a>
{% else %}
{% if user.is_authenticated %}
<form class="form-inline mt-2 mt-md-0" method="post" action="{% url 'accounts:logout' %}">
{% csrf_token %}
<button class="btn btn-danger" type="submit"><i class="fas fa-right-from-bracket"></i> abmelden</button>
</form>
{% else %}
<form class="form-inline mt-2 mt-md-0">
<a class="btn btn-primary" role="button" href="{% url 'accounts:login' %}"><i class="fas fa-right-to-bracket"></i> Anmeldung</a>
{% endif %}
</form>
</form>
{% endif %}
</div>
</div>
</nav>
Expand Down

0 comments on commit c1a21b4

Please sign in to comment.