aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBonfaceKilz2022-05-24 11:50:08 +0300
committerBonfaceKilz2022-05-27 15:17:52 +0300
commitcc951f8f18e4002de146910124129d9fcca6ba06 (patch)
tree7dfa09bfcee00547ae35419efeb82501bcc9b33c
parent99ee67278c9ef0791bd65c34d5f4328844c0a6de (diff)
downloadgenenetwork2-cc951f8f18e4002de146910124129d9fcca6ba06.tar.gz
Add js logic to POST to "approval" endpoint
-rw-r--r--wqflask/wqflask/templates/case_attributes.html10
1 files changed, 10 insertions, 0 deletions
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();
+ }
})
}
});