From 4af2562121c9e032804518ec51237dcc26cbd88b Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Sat, 1 Apr 2017 09:34:02 -0300 Subject: [PATCH] More clarity in argument names --- kfet/templates/kfet/kpsul.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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, });