<commit_before><script>
  function filterSearch(){
    // cribbed off stackoverflow like a boss: https://stackoverflow.com/questions/2417928/delete-empty-values-from-forms-params-before-submitting-it
    form = jQuery("#search");
    form.find(':input', this).each(function() {
        this.disabled = !($(this).val());
    });
  }
</script>

<form action="/addresses" class="well form-inline" role="form" id="search" onSubmit="filterSearch(); return true" >
	<div class="form-group">
		<label class="sr-only" for="street">Street</label>
		<input type="text" class="form-control" id="street" name="street" placeholder="Street" value="<%= params[:street]%>">
	</div>
	<div class="form-group">
		<label class="sr-only" for="town">Town</label>
		<input type="text" class="form-control" id="town" name="town" placeholder="Town or City" value="<%= params[:town]%>">
	</div>
	<div class="form-group">
		<label class="sr-only" for="postcode">Postcode</label>
		<input type="text" class="form-control" id="postcode" name="postcode" placeholder="Postcode" value="<%= params[:postcode]%>">
	</div>
  <div class="form-group">
	   <button type="submit" class="btn btn-primary">Search for addresses</button>
  </div>
</form>
<commit_msg>Make sure form elements are enabled on page load<commit_after><script>
  function filterSearch(){
    // cribbed off stackoverflow like a boss: https://stackoverflow.com/questions/2417928/delete-empty-values-from-forms-params-before-submitting-it
    form = jQuery("#search");
    form.find(':input', this).each(function() {
        this.disabled = !($(this).val());
    });
  }

  // Make sure form elements are enabled (needed for Firefox)
  form = jQuery("#search");
  form.find(':input', this).each(function() {
    this.disabled = false;
  });
</script>

<form action="/addresses" class="well form-inline" role="form" id="search" onSubmit="filterSearch(); return true" >
	<div class="form-group">
		<label class="sr-only" for="street">Street</label>
		<input type="text" class="form-control" id="street" name="street" placeholder="Street" value="<%= params[:street]%>">
	</div>
	<div class="form-group">
		<label class="sr-only" for="town">Town</label>
		<input type="text" class="form-control" id="town" name="town" placeholder="Town or City" value="<%= params[:town]%>">
	</div>
	<div class="form-group">
		<label class="sr-only" for="postcode">Postcode</label>
		<input type="text" class="form-control" id="postcode" name="postcode" placeholder="Postcode" value="<%= params[:postcode]%>">
	</div>
  <div class="form-group">
	   <button type="submit" class="btn btn-primary">Search for addresses</button>
  </div>
</form>

{'fraction_non_alphanumeric': 0.20693554466641537, 'fraction_numerical': 0.005277044854881266, 'mean_word_length': 5.364508393285372, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 2, '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': '649924', 'n_tokens_mistral': 913, 'n_tokens_neox': 857, 'n_words': 183}