<commit_before>var workcoachPerformance = (function(){

	/*
	* displayCorrectCohortInputType - determine the correct cohort to display.   
	* Based on number of workcoaches selected and the benefit
	*/
	function displayCorrectCohortInputType(){
		var allSelected = $('#organisations-filter input:eq(0)').filter(':checked').length;
		var numberOfWorkcoachesSelected = $('#organisations-filter input:gt(0)').filter(':checked').length;

		var cohortMonthInputType = numberOfWorkcoachesSelected > 1 ? 'Single' : 'Multi';
		cohortMonthInputType = allSelected ? 'Single' : cohortMonthInputType;

		var numberOfCohorts = $('#benefit option:selected').data('numberOfCohorts');

		$('[data-type="cohortInput"]').hide();

		var selectorInput = '#cohortMonth' + cohortMonthInputType + 'Previous' + numberOfCohorts;

		$(selectorInput).show();
	}

	/*
	* toggleSearchButton
	*/
	function toggleSearchButton(){
		var disabledStatus = !$('[data-type="cohortInput"]:visible').length;

		$('#searchButton').prop('disabled', disabledStatus);
	}

	/*
	* clearFilter - clears the inputs
	*/
	function clearFilter(){
		// reset selects and 
		$('select').find('option:eq(0)').prop('selected', true)

		//reset check boxes
		$('input[type="checkbox"').prop('checked', false);		
	}

	/*
	* updatePageStatus - determine which cohort to display, if any and the status of the search button
	*/
	function updatePageStatus(){
		displayCorrectCohortInputType();
		toggleSearchButton();
	}

	return {
		updatePageStatus: updatePageStatus,
		clearFilter: function(){
			clearFilter();
			displayCorrectCohortInputType();
		}<commit_msg>Fix the toogle button when filters are cleared<commit_after>var workcoachPerformance = (function(){

	/*
	* displayCorrectCohortInputType - determine the correct cohort to display.   
	* Based on number of workcoaches selected and the benefit
	*/
	function displayCorrectCohortInputType(){
		var allSelected = $('#organisations-filter input:eq(0)').filter(':checked').length;
		var numberOfWorkcoachesSelected = $('#organisations-filter input:gt(0)').filter(':checked').length;

		var cohortMonthInputType = numberOfWorkcoachesSelected > 1 ? 'Single' : 'Multi';
		cohortMonthInputType = allSelected ? 'Single' : cohortMonthInputType;

		var numberOfCohorts = $('#benefit option:selected').data('numberOfCohorts');

		$('[data-type="cohortInput"]').hide();

		var selectorInput = '#cohortMonth' + cohortMonthInputType + 'Previous' + numberOfCohorts;

		$(selectorInput).show();
	}

	/*
	* toggleSearchButton
	*/
	function toggleSearchButton(){
		var disabledStatus = !$('[data-type="cohortInput"]:visible').length;

		$('#searchButton').prop('disabled', disabledStatus);
	}

	/*
	* clearFilter - clears the inputs
	*/
	function clearFilter(){
		// reset selects and 
		$('select').find('option:eq(0)').prop('selected', true)

		//reset check boxes
		$('input[type="checkbox"').prop('checked', false);		
	}

	/*
	* updatePageStatus - determine which cohort to display, if any and the status of the search button
	*/
	function updatePageStatus(){
		displayCorrectCohortInputType();
		toggleSearchButton();
	}

	return {
		updatePageStatus: updatePageStatus,
		clearFilter: function(){
			clearFilter();
			displayCorrectCohortInputType();
			toggleSearchButton();
		}
{'fraction_non_alphanumeric': 0.14587155963302753, 'fraction_numerical': 0.0024464831804281344, 'mean_word_length': 5.266283524904215, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4432428', 'n_tokens_mistral': 1079, 'n_tokens_neox': 955, 'n_words': 210}