From cc951f8f18e4002de146910124129d9fcca6ba06 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 24 May 2022 11:50:08 +0300 Subject: Add js logic to POST to "approval" endpoint --- wqflask/wqflask/templates/case_attributes.html | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'wqflask') diff --git a/wqflask/wqflask/templates/case_attributes.html b/wqflask/wqflask/templates/case_attributes.html index 3987e2bd..bd72f346 100644 --- a/wqflask/wqflask/templates/case_attributes.html +++ b/wqflask/wqflask/templates/case_attributes.html @@ -392,6 +392,16 @@ }) } }); + $(".approve").click(function(){ + let id = $(this).data("id"); + if (Number.isInteger(id)) { + $.ajax({ + type: "POST", + data: {"id": id}, + url: '{{ url_for("metadata_edit.approve_case_attribute_data") }}', + success: function(data, status, xhr) { + location.reload(); + } }) } }); -- cgit v1.2.3