diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html index 45416d06..80a384fe 100644 --- a/kfet/templates/kfet/kpsul.html +++ b/kfet/templates/kfet/kpsul.html @@ -182,7 +182,7 @@ $(document).ready(function() { settings = {} function resetSettings() { - $.ajax({ + return $.ajax({ dataType: "json", url : "{% url 'kfet.kpsul.get_settings' %}", method : "POST", @@ -191,7 +191,6 @@ $(document).ready(function() { settings['addcost_for'] = data['addcost_for']; settings['addcost_amount'] = parseFloat(data['addcost_amount']); settings['subvention_cof'] = parseFloat(data['subvention_cof']); - displayAddcost(); }); } @@ -1431,9 +1430,11 @@ $(document).ready(function() { resetArticles(); resetPreviousOp(); khistory.reset(); - resetSettings(); - getArticles(); - getHistory(); + resetSettings().done(function (){ + getArticles(); + getHistory(); + displayAddcost(); + }); } function resetSelectable() {