<commit_before>extends layout

block header
	link(rel='stylesheet', href='/css/form.css')
	link(rel='stylesheet', href='http://fonts.googleapis.com/css?family=Lobster+Two:400italic|Open+Sans:300,400', type='text/css')

block content
	#content-wrapper.row
		div(style='height:calc(100vh - 50px); overflow-y: scroll;')
			p#search.center-align Search Road Trips
			.row.center-align
				#searchResults.col.s12
			div.container.col.s12
				form#searchRoadTrips.col.s6.offset-s3(action='#', method='POST')
					.row
						.input-field.col.s12
							input#destination.validate(type='text', required='required')
							label(for='destination') Destination
					.row
						.input-field.col.s12
							input#time.datepicker(type='date')
							label(for='time') Date
					.row
						.input-field.col.s12
							p.range-field
								input#seats.validate(type='range', min='0', max='7', value='3', style='border: none;')
								label(for='seats',style='margin: 20px 0 0 -12px;') Number of Available Seats
					button.btn.waves-effect.waves-light(type='submit', name='action', style='font-size: 18px; float: right;') Submit
						i.mdi-content-send.right
		
		include footer.jade

	script.
		$(document).ready(function() {
			$('.datepicker').pickadate({ selectMonths: true, selectYears: 1 });
		});

		$('#searchRoadTrips').submit(function(event) {
			event.preventDefault();
			$.ajax({
				url: 'http://s4.jagels.io:3000/trips',
				success: function(data) {
					$('#searchRoadTrips').fadeOut();
					var locations = [];
					$.each(data, function(index, value) {
						if(value.destination === $('input#destination').val() && value.seats >= parseInt($('input#seats').val())) {
							location.push(value);
						}
					});
					$.each(locations, function(index, value) {
						var $card = $('<div class="card"><div class="card-image waves-effect waves-block waves-light"><img class="activator" src=""></div><div class="card-content"><span class="card-title activator grey-text text-darken-4">Card Title <i class="mdi-navigation-more-vert right"></i></span></div><div class="card-reveal"><span class="card-title grey-text text-darken-4">Card Title <i class="mdi-navigation-close right"></i></span><p>Here is some more information about this product that is only revealed once clicked on.</p></div></div>');
						$card.find(".card-title").text(value.origin + " -> " + value.destination);
						$card.find(".card-content p").text(value.seats + " seats are available for this road trip. Hosted by " + value.userid);
						$card.find(".card-image img").attr('src', "https://maps.googleapis.com/maps/api/staticmap?center=" + value.destination + "&zoom=12&size=400x300&markers=" + value.destination);<commit_msg>Fix form<commit_after>extends layout

block header
	link(rel='stylesheet', href='/css/form.css')
	link(rel='stylesheet', href='http://fonts.googleapis.com/css?family=Lobster+Two:400italic|Open+Sans:300,400', type='text/css')

block content
	#content-wrapper.row
		div(style='height:calc(100vh - 50px); overflow-y: scroll;')
			p#search.center-align Search Road Trips
			.row.center-align
				#searchResults.col.s12
			div.container.col.s12
				form#searchRoadTrips.col.s6.offset-s3(action='#', method='POST')
					.row
						.input-field.col.s12
							input#destination.validate(type='text', required='required')
							label(for='destination') Destination
					.row
						.input-field.col.s12
							input#time.datepicker(type='date')
							label(for='time') Date
					.row
						.input-field.col.s12
							p.range-field
								input#seats.validate(type='range', min='1', max='7', value='3', style='border: none;')
								label(for='seats',style='margin: 20px 0 0 -12px;') Number of Available Seats
					button.btn.waves-effect.waves-light(type='submit', name='action', style='font-size: 18px; float: right;') Submit
						i.mdi-content-send.right
		
		include footer.jade

	script.
		$(document).ready(function() {
			$('.datepicker').pickadate({ selectMonths: true, selectYears: 1 });
		});

		$('#searchRoadTrips').submit(function(event) {
			event.preventDefault();
			$.ajax({
				url: 'http://s4.jagels.io:3000/trips',
				success: function(data) {
					$('#searchRoadTrips').fadeOut();
					var locations = [];
					$.each(data, function(index, value) {
						if(value.destination === $('input#destination').val() && value.seats >= parseInt($('input#seats').val())) {
							locations.push(value);
						}
					});
					$.each(locations, function(index, value) {
						var $card = $('<div class="card"><div class="card-image waves-effect waves-block waves-light"><img class="activator" src=""></div><div class="card-content"><span class="card-title activator grey-text text-darken-4">Card Title <i class="mdi-navigation-more-vert right"></i></span></div><div class="card-reveal"><span class="card-title grey-text text-darken-4">Card Title <i class="mdi-navigation-close right"></i></span><p>Here is some more information about this product that is only revealed once clicked on.</p></div></div>');
						$card.find(".card-title").text(value.origin + " -> " + value.destination);
						$card.find(".card-content p").text(value.seats + " seats are available for this road trip. Hosted by " + value.userid);
						$card.find(".card-image img").attr('src', "https://maps.googleapis.com/maps/api/staticmap?center=" + value.destination + "&zoom=12&size=400x300&markers=" + value.destination);
{'fraction_non_alphanumeric': 0.1891891891891892, 'fraction_numerical': 0.019622362088115512, 'mean_word_length': 4.049532710280374, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 45, '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': '3706401', 'n_tokens_mistral': 2155, 'n_tokens_neox': 1725, 'n_words': 306}