diff --git a/app/assets/javascripts/my_modules.js b/app/assets/javascripts/my_modules.js index a77645055..cfb2fb20e 100644 --- a/app/assets/javascripts/my_modules.js +++ b/app/assets/javascripts/my_modules.js @@ -258,6 +258,12 @@ animateSpinner(); $.ajax({ url: list.data('link-url'), + beforeSend: function(e, ajaxSettings) { + if (item.data('beforeSend') instanceof Function) { + return item.data('beforeSend')(item, ajaxSettings) + } + return true + }, type: 'PATCH', data: { my_module: { status_id: item.data('state-id') } }, error: function(e) { diff --git a/app/views/my_modules/status_flow/_task_flow_button.html.erb b/app/views/my_modules/status_flow/_task_flow_button.html.erb index 2a5c80804..54fb84ab8 100644 --- a/app/views/my_modules/status_flow/_task_flow_button.html.erb +++ b/app/views/my_modules/status_flow/_task_flow_button.html.erb @@ -25,7 +25,7 @@ <% unless status.initial_status? %> <% previous_s = status.previous_status %> <% previous_s_errors = previous_s.conditions_errors(my_module) %> -