From be3fdac8a95aac5c432ff830b1f70bf80abd00e8 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 19 May 2020 15:28:31 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E5=A4=8DAPI-key=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=88=A0=E9=99=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/authentication/_access_key_modal.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/authentication/templates/authentication/_access_key_modal.html b/apps/authentication/templates/authentication/_access_key_modal.html index f0b34cf30..71b1f67f5 100644 --- a/apps/authentication/templates/authentication/_access_key_modal.html +++ b/apps/authentication/templates/authentication/_access_key_modal.html @@ -135,6 +135,19 @@ $(document).ready(function () { } }; requestApi(data) +}).on('click', '.btn-api-keydel', function (){ + var url = "{% url "api-auth:access-key-detail" pk=DEFAULT_PK %}"; + url = url.replace("{{ DEFAULT_PK }}", $(this).data("id")) ; + var data = { + url: url, + method: "DELETE", + success: function () { + ak_table.ajax.reload(); + }, + success_message: "{% trans 'Delete success' %}" + + }; + requestApi(data) }) {% endblock %}