mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 06:22:16 +00:00
Fixes #357, removes the ability to delete assets
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
function formAssetSearch() {
|
||||
$.ajax({
|
||||
url : "/asset/filter/", // the endpoint
|
||||
type : "POST", // http method
|
||||
data : {
|
||||
sender: 'asset_update',
|
||||
form: "csrfmiddlewaretoken=" + $('input[name=csrfmiddlewaretoken]').val() + "&asset_id=" + $('#parent_search').val()
|
||||
},
|
||||
traditional: true,
|
||||
|
||||
success : function(data) {
|
||||
// console.log(data);
|
||||
$('#formAssetSearchResult').html(data);
|
||||
// window.location.href = data['url'];
|
||||
},
|
||||
|
||||
error : function(xhr) {console.log(xhr.status + ": " + xhr.responseText)}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteAsset(asset_id) {
|
||||
$.ajax({
|
||||
url : "/asset/delete/", // the endpoint
|
||||
type : "POST", // http method
|
||||
data : {
|
||||
asset_id: asset_id
|
||||
},
|
||||
traditional: true,
|
||||
|
||||
success : function(data) {
|
||||
// console.log(data);
|
||||
window.location.href = data['url'];
|
||||
},
|
||||
|
||||
error : function(xhr) {console.log(xhr.status + ": " + xhr.responseText)}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user