diff --git a/app/templates/template_edit.html b/app/templates/template_edit.html
index 28d953e..6719e78 100644
--- a/app/templates/template_edit.html
+++ b/app/templates/template_edit.html
@@ -195,7 +195,7 @@
// following unbind("click") is to avoid multiple times execution
modal.find('#button_apply_confirm').unbind("click").click(function() {
var data = getTableData(table);
- applyChanges( {'_csrf_token': '{{ csrf_token() }}', 'records': data}, '/template/' + template + '/apply', true);
+ applyChanges( {'_csrf_token': '{{ csrf_token() }}', 'records': data}, $SCRIPT_ROOT + '/template/' + template + '/apply', true);
modal.modal('hide');
})
modal.modal('show');