Skip to content
Snippets Groups Projects
Commit f4f5771f authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Add csrf_token to delete_protocol links

parent 3b50185d
Branches
No related tags found
No related merge requests found
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
{% endif %} {% endif %}
{% if has_admin_right %} {% 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-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 %}
{% endif %} {% endif %}
</div> </div>
......
...@@ -144,7 +144,9 @@ class ProtocolsTable(Table): ...@@ -144,7 +144,9 @@ class ProtocolsTable(Table):
if protocol.protocoltype.has_admin_right(user): if protocol.protocoltype.has_admin_right(user):
buttons.append(Table.button( 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", icon="trash",
style="danger", style="danger",
confirm="Bist du dir sicher, dass du das Protokoll {} " confirm="Bist du dir sicher, dass du das Protokoll {} "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment