1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-24 19:20:29 +02:00

clean code

This commit is contained in:
Pierre-antoine Comby
2020-03-24 23:02:12 +01:00
parent 41568916b8
commit 9f53bda1cd
2 changed files with 25 additions and 21 deletions

View File

@ -63,15 +63,13 @@ function search_field_moved(secondfield) {
$.ajax({
url:"/api/note/transaction/template/"+button_id,
method:"DELETE",
headers: {
"X-CSRFTOKEN": CSRF_TOKEN
},
success: function(){
addMsg('{% trans "button successfully deleted "%}','success');
$("#buttons_table").load('{% url "note:template_list" %} #buttons_tables');
},
error: addMsg(' {% trans "Unable to delete button "%} #' + button_id,'danger' )
});
}
headers: {"X-CSRFTOKEN": CSRF_TOKEN}
})
.done(function(){
addMsg('{% trans "button successfully deleted "%}','success');
$("#buttons_table").load("{% url 'note:template_list' %} #buttons_table");
})
.fail(addMsg(' {% trans "Unable to delete button "%} #' + button_id,'danger' ));
}
</script>
{% endblock %}