diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html
index c0761fa4..d07565fb 100644
--- a/kfet/templates/kfet/kpsul.html
+++ b/kfet/templates/kfet/kpsul.html
@@ -238,15 +238,15 @@ $(document).ready(function() {
api_with_auth({
url: Urls['kfet.kpsul.perform_operations'](),
data: data,
- on_success: function(data) {
+ on_success: function() {
updatePreviousOp();
coolReset();
},
- on_400: function(data) {
- if ('need_comment' in data['errors'])
+ on_400: function(response) {
+ if ('need_comment' in response['errors'])
askComment(performOperations);
else
- displayErrors(getErrorsHtml(data));
+ displayErrors(getErrorsHtml(response));
},
next_focus: articleSelect,
});
@@ -269,11 +269,11 @@ $(document).ready(function() {
api_with_auth({
url: Urls['kfet.kpsul.cancel_operations'](),
data: data,
- on_success: function(data) {
+ on_success: function() {
coolReset();
},
- on_400: function(data) {
- displayErrors(getErrorsHtml(data));
+ on_400: function(response) {
+ displayErrors(getErrorsHtml(response));
},
next_focus: kpsul.account_manager,
});
@@ -815,8 +815,8 @@ $(document).ready(function() {
api_with_auth({
url: Urls['kfet.kpsul.update_addcost'](),
data: data,
- on_400: function(data) {
- askAddcost(getErrorsHtml(data));
+ on_400: function(response) {
+ askAddcost(getErrorsHtml(response));
},
next_focus: kpsul.account_manager,
});