From b0e130ef119a417afde97b3d009753b5b7e3d4a9 Mon Sep 17 00:00:00 2001 From: Julien BERNARD Date: Wed, 4 Sep 2024 09:04:24 -0400 Subject: [PATCH] Replace remaining get with post in delete endpoints --- .../templates/lgr_editor/codepoint_list.html | 2 +- .../templates/lgr_editor/codepoint_view.html | 29 +++++++++++--- .../templates/lgr_editor/references.html | 15 ++++--- .../lgr_editor/templates/lgr_editor/tags.html | 15 ++++--- .../lgr_editor/views/codepoints/codepoint.py | 6 +-- src/lgr_advanced/lgr_editor/views/create.py | 3 +- .../lgr_editor/views/reference.py | 2 +- src/lgr_advanced/lgr_editor/views/tag.py | 2 +- .../templates/lgr_advanced/index.html | 40 ++++++++++++------- .../icann_mode.html | 20 ++++++---- .../list_reports.html | 22 +++++----- .../list_report_files.html | 20 ++++++---- .../templates/lgr_models/_report_list.html | 20 ++++++---- src/lgr_session/views.py | 3 +- 14 files changed, 120 insertions(+), 79 deletions(-) diff --git a/src/lgr_advanced/lgr_editor/templates/lgr_editor/codepoint_list.html b/src/lgr_advanced/lgr_editor/templates/lgr_editor/codepoint_list.html index 9a385e8b..2de63e49 100644 --- a/src/lgr_advanced/lgr_editor/templates/lgr_editor/codepoint_list.html +++ b/src/lgr_advanced/lgr_editor/templates/lgr_editor/codepoint_list.html @@ -185,7 +185,7 @@ if (tmp_lgr) { let url = '{% url "delete_lgr" lgr_pk=42 %}'.replace('42', tmp_lgr); $.ajax({ - type: "GET", + type: "POST", url: url }); } diff --git a/src/lgr_advanced/lgr_editor/templates/lgr_editor/codepoint_view.html b/src/lgr_advanced/lgr_editor/templates/lgr_editor/codepoint_view.html index 692b8eec..7f7889a6 100644 --- a/src/lgr_advanced/lgr_editor/templates/lgr_editor/codepoint_view.html +++ b/src/lgr_advanced/lgr_editor/templates/lgr_editor/codepoint_view.html @@ -8,6 +8,10 @@ .tag-field .control-label { width: 100%; } + .btn-link:hover { + text-decoration: none; + color: #333; + } {% endblock %} @@ -94,7 +98,17 @@

Variants

{% if not is_set %} @@ -156,10 +170,15 @@

References

{% if not is_set %}
- - - {% trans 'Delete code point' %} +
+ {% csrf_token %} + +
{% endif %}