diff --git a/app/controllers/chargeback_assignment_controller.rb b/app/controllers/chargeback_assignment_controller.rb index 27469448942a..1cbf8fa7cc17 100644 --- a/app/controllers/chargeback_assignment_controller.rb +++ b/app/controllers/chargeback_assignment_controller.rb @@ -15,6 +15,7 @@ def index assert_privileges("chargeback_assignments") @tabform = ChargebackRate::VALID_CB_RATE_TYPES.include?(params[:tab]) ? params[:tab] : "Compute" + tab_vars(@tabform) session[:changed] = @changed = false build_tabs set_form_vars @@ -25,11 +26,17 @@ def change_tab clear_flash_msg @tabform = params['uib-tab'] + tab_vars(params['uib-tab']) build_tabs set_form_vars render :action => "index" end + def tab_vars(current_tab) + @path = '/chargeback_assignment/change_tab/' + @current_tab = current_tab.to_s + end + # AJAX driven routine to check for changes in ANY field on the form def form_field_changed assert_privileges("chargeback_assignments")