anchor.diff:  			viewModel.saveProgress.reset();
   			Popup.showErrorPopup("<%= data[:strings][:main][:load_progress][:save_error] %>", error.message);
   
  -			return $q.reject(error);
  -		});
  +			if (shouldReturnPromise) {
  +				return $q.reject(error);
  +			}
  +		});
  +
  +		if (shouldReturnPromise) {
  +			return promise;
  +		}
   	};
   
   	viewModel.isSaveEnabled = function() {
  
positive.code: 			}
  
  			Popup.showConfirmPopup("<%= data[:strings][:main][:confirm_tab_change_save_popup][:title] %>", "<%= data[:strings][:main][:confirm_tab_change_save_popup][:details] %>", "<%= data[:strings][:main][:confirm_tab_change_save_popup][:save] %>", "<%= data[:strings][:main][:confirm_tab_change_save_popup][:cancel] %>", function() {
  				viewModel.save().then(function() {
  					resolve();
  				}, function(error) {
  					reject();
  
negative.code: 		}
  	});
  
  	viewModel.save = function(shouldReturnPromise) {
  		if (shouldReturnPromise === undefined) {
  			shouldReturnPromise = false;
  		}
  
  		viewModel.saveProgress.start("<%= data[:strings][:main][:load_progress][:saving] %>");
  
  		var promise = $q.all([$q(function(resolve, reject) {
  			switch (viewModel.currentMenu.id) {
  				case "workflows":
  				case "env-vars":
  