Commit f4f5771f authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Add csrf_token to delete_protocol links

parent 3b50185d
......@@ -51,7 +51,7 @@
{% endif %}
{% if has_admin_right %}
<a class="btn btn-default" href="{{url_for("recompile_protocol", protocol_id=protocol.id, csrf_token=get_csrf_token())}}">Neu kompilieren</a>
<a class="btn btn-danger" href="{{url_for("delete_protocol", protocol_id=protocol.id)}}" onclick="return confirm('Bist du dir sicher, dass du das Protokoll {{protocol.get_short_identifier()}} löschen möchtest?');">Löschen</a>
<a class="btn btn-danger" href="{{url_for("delete_protocol", protocol_id=protocol.id, csrf_token=get_csrf_token())}}" onclick="return confirm('Bist du dir sicher, dass du das Protokoll {{protocol.get_short_identifier()}} löschen möchtest?');">Löschen</a>
{% endif %}
{% endif %}
</div>
......
......@@ -144,7 +144,9 @@ class ProtocolsTable(Table):
if protocol.protocoltype.has_admin_right(user):
buttons.append(Table.button(
url_for("delete_protocol", protocol_id=protocol.id),
url_for(
"delete_protocol", protocol_id=protocol.id,
csrf_token=get_csrf_token()),
icon="trash",
style="danger",
confirm="Bist du dir sicher, dass du das Protokoll {} "
......
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