<commit_before>extends layout

block head
	title Sign Up | Pictroid

block variables
	- var bodyStyle = "background-image: url(/images/wallpaper.jpg); background-color: #000000;"
	- var headerClasses = 'navbar-fixed-top navbar-transparent'

block content
	.jumbotron.dark.center(style="background: transparent;")
		form.form-signin.form-transparent(role="form", action="/user_signup", method="POST", onsubmit="return validateForm()")
			img(src="/images/logo/icon.png", alt="Pictroid", height="75")
			hr
			input.form-control(type="text", name="username", placeholder="Username")
			input.form-control(type="email", name="email", placeholder="Email")
			input.form-control(type="password", name="password", placeholder="Password")
			p(id="emsg")
			button.btn.btn-lg.btn-primary.btn-block(type="submit") Sign Up
			br
			p(style="text-align: center;")
				| Already have an account?  Then <a href="/signin">Sign In</a>
			script
				var valid = false,
					form = document.forms[0],
					emsg = document.querySelectorAll("#emsg")[0];
				valid = ((/^[a-z0-9_-]{6,10}$/).test(form.username) && (/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/).test(form.email) && (/^[a-z0-9_-]{6,14}$/).test(form.email)) ? true : false;
				if(valid) {
					return true;
				} else {
					emsg.textContent = "Invalid credentials supplied";
					return false;
				}<commit_msg>Fix problem in signup view<commit_after>extends layout

block head
	title Sign Up | Pictroid

block variables
	- var bodyStyle = "background-image: url(/images/wallpaper.jpg); background-color: #000000;"
	- var headerClasses = 'navbar-fixed-top navbar-transparent'

block content
	.jumbotron.dark.center(style="background: transparent;")
		form.form-signin.form-transparent(role="form", action="/signup", method="POST", onsubmit="return validateForm()")
			img(src="/images/logo/icon.png", alt="Pictroid", height="75")
			hr
			input.form-control(type="text", name="username", placeholder="Username")
			input.form-control(type="email", name="email", placeholder="Email")
			input.form-control(type="password", name="password", placeholder="Password")
			p(id="emsg")
			button.btn.btn-lg.btn-primary.btn-block(type="submit") Sign Up
			br
			p(style="text-align: center;")
				| Already have an account?  Then <a href="/signin">Sign In</a>
			script
				var valid = false,
					form = document.forms[0],
					emsg = document.querySelectorAll("#emsg")[0];
				valid = ((/^[a-z0-9_-]{6,10}$/).test(form.username) && (/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/).test(form.email) && (/^[a-z0-9_-]{6,14}$/).test(form.email)) ? true : false;
				if (valid)
					return true;
				else
					emsg.textContent = "Invalid credentials supplied";
					return false;
{'fraction_non_alphanumeric': 0.2027175908923981, 'fraction_numerical': 0.017627616599338966, 'mean_word_length': 4.218390804597701, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6841747', 'n_tokens_mistral': 1071, 'n_tokens_neox': 928, 'n_words': 167}