<commit_before>(function () {
	'use strict';

	mare.views.FamilyRegistration = Backbone.View.extend({
		el: 'registration-form--family',

		events: {
			'change .other-way-to-hear-about-mare'			: 'toggleOtherWayToHearTextField',
			'change #prospective-parent-or-family-state'	: 'toggleHomestudySubmission',
			'change .homestudy-completed-checkbox'			: 'toggleHomestudySection',
			'change #upload-button'							: 'uploadForm'
		},

		initialize: function() {
			// DOM cache any commonly used elements to improve performance
			this.$howDidYouHearOther			= this.$('#prospective-parent-how-did-you-hear-other');
			this.$state							= this.$('#prospective-parent-or-family-state');
			this.$homestudySection				= this.$('.prospective-family-submit-your-homestudy-section');
			this.$homestudySubmissionSection	= this.$('.prospective-parent-homestudy-details-section');
			// Initialize parsley validation on the form
			this.$el.parsley();
			this.form.on('field:validated', this.validateForm);
		},

		toggleOtherWayToHearTextField: function toggleOtherWayToHearTextField() {
			this.$howDidYouHearOther.toggleClass('hidden');
		},

		toggleHomestudySubmission: function toggleHomestudySubmission() {
			var selectedOption = this.$state.children('option:selected');

			if(selectedOption.html() === 'Massachusetts') {
				// Show the homestudy section of the form
				this.$homestudySection.show();
			} else {
				// hide the homestudy section of the form
				this.$homestudySection.hide();
				// clear out any uploaded homestudy files
				this.$('[name=HomeStudySubmission]').attr('checked', false);
				this.$('#home-study-file-upload').val(''); // TODO: homestudy is one word, the JavaScript, HTML, and CSS needs to be cleaned up everywhere for this
			}
		},

		toggleHomestudySection: function toggleHomestudySection() {
			this.$homestudySubmissionSection.toggleClass('hidden');
		},

		uploadForm: function uploadForm(event) {
			var target = event.target
			this.$("#home-study-file-upload").val(target.value);
		},

		validateForm: function validateForm() {
			var ok = $('.parsley-error').length === 0;
			$('.bs-callout-info').toggleClass('hidden', !ok);
			$('.bs-callout-warning').toggleClass('hidden', ok);
		}

	});
})();<commit_msg>Remove the validation binding from the family registration form to make it selectable again.<commit_after>(function () {
	'use strict';

	mare.views.FamilyRegistration = Backbone.View.extend({
		el: 'registration-form--family',

		events: {
			'change .other-way-to-hear-about-mare'			: 'toggleOtherWayToHearTextField',
			'change #prospective-parent-or-family-state'	: 'toggleHomestudySubmission',
			'change .homestudy-completed-checkbox'			: 'toggleHomestudySection',
			'change #upload-button'							: 'uploadForm'
		},

		initialize: function() {
			// DOM cache any commonly used elements to improve performance
			this.$howDidYouHearOther			= this.$('#prospective-parent-how-did-you-hear-other');
			this.$state							= this.$('#prospective-parent-or-family-state');
			this.$homestudySection				= this.$('.prospective-family-submit-your-homestudy-section');
			this.$homestudySubmissionSection	= this.$('.prospective-parent-homestudy-details-section');
			// Initialize parsley validation on the form
			// this.$el.parsley();
			// this.form.on('field:validated', this.validateForm);
		},

		toggleOtherWayToHearTextField: function toggleOtherWayToHearTextField() {
			this.$howDidYouHearOther.toggleClass('hidden');
		},

		toggleHomestudySubmission: function toggleHomestudySubmission() {
			var selectedOption = this.$state.children('option:selected');

			if(selectedOption.html() === 'Massachusetts') {
				// Show the homestudy section of the form
				this.$homestudySection.show();
			} else {
				// hide the homestudy section of the form
				this.$homestudySection.hide();
				// clear out any uploaded homestudy files
				this.$('[name=HomeStudySubmission]').attr('checked', false);
				this.$('#home-study-file-upload').val(''); // TODO: homestudy is one word, the JavaScript, HTML, and CSS needs to be cleaned up everywhere for this
			}
		},

		toggleHomestudySection: function toggleHomestudySection() {
			this.$homestudySubmissionSection.toggleClass('hidden');
		},

		uploadForm: function uploadForm(event) {
			var target = event.target
			this.$("#home-study-file-upload").val(target.value);
		}

		// validateForm: function validateForm() {
		// 	var ok = $('.parsley-error').length === 0;
		// 	$('.bs-callout-info').toggleClass('hidden', !ok);
		// 	$('.bs-callout-warning').toggleClass('hidden', ok);
		// }

	});
})();
{'fraction_non_alphanumeric': 0.15511622854660004, 'fraction_numerical': 0.00043449923962633063, 'mean_word_length': 4.12694877505568, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1995529', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1435, 'n_words': 265}