mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-27 02:43:01 +00:00
wrap in function for correct behavior
This commit is contained in:
parent
9be93db9af
commit
b3c1032f4f
@ -61,7 +61,7 @@ function search_field_moved(secondfield) {
|
|||||||
// on click of button "delete" , call the API
|
// on click of button "delete" , call the API
|
||||||
function delete_button(button_id){
|
function delete_button(button_id){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"/api/note/transaction/template/"+button_id,
|
url:"/api/note/transaction/template/"+button_id+"/",
|
||||||
method:"DELETE",
|
method:"DELETE",
|
||||||
headers: {"X-CSRFTOKEN": CSRF_TOKEN}
|
headers: {"X-CSRFTOKEN": CSRF_TOKEN}
|
||||||
})
|
})
|
||||||
@ -69,7 +69,9 @@ function search_field_moved(secondfield) {
|
|||||||
addMsg('{% trans "button successfully deleted "%}','success');
|
addMsg('{% trans "button successfully deleted "%}','success');
|
||||||
$("#buttons_table").load("{% url 'note:template_list' %} #buttons_table");
|
$("#buttons_table").load("{% url 'note:template_list' %} #buttons_table");
|
||||||
})
|
})
|
||||||
.fail(addMsg(' {% trans "Unable to delete button "%} #' + button_id,'danger' ));
|
.fail(function(){
|
||||||
|
addMsg(' {% trans "Unable to delete button "%} #' + button_id,'danger' )
|
||||||
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
Reference in New Issue
Block a user