From 8bfd2be21ff77ec0898bb430153f235a8581ca58 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 10 Jul 2018 15:50:15 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E6=B8=85=E9=99=A4=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=AE=A4=E8=AF=81=E4=BF=A1=E6=81=AF=E6=97=B6?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/assets/system_user_detail.html | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/apps/assets/templates/assets/system_user_detail.html b/apps/assets/templates/assets/system_user_detail.html index b68bf2689..f0ed6030c 100644 --- a/apps/assets/templates/assets/system_user_detail.html +++ b/apps/assets/templates/assets/system_user_detail.html @@ -337,10 +337,22 @@ $(document).ready(function () { }); }).on('click', '.btn-clear-auth', function () { var the_url = '{% url "api-assets:system-user-auth-info" pk=system_user.id %}'; - APIUpdateAttr({ - url: the_url, - method: 'DELETE', - success_message: "{% trans 'Clear auth' %}" + " {% trans 'success' %}" + var name = '{{ system_user.name }}'; + swal({ + title: '你确定清除该系统用户的认证信息吗 ?', + text: " [" + name + "] ", + type: "warning", + showCancelButton: true, + cancelButtonText: '取消', + confirmButtonColor: "#ed5565", + confirmButtonText: '确认', + closeOnConfirm: true + }, function () { + APIUpdateAttr({ + url: the_url, + method: 'DELETE', + success_message: "{% trans 'Clear auth' %}" + " {% trans 'success' %}" + }); }); })