From 75a581386e32772ce45464aadec93efcfbfef2fe Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 13 Jan 2019 16:22:06 -0800 Subject: [PATCH 1/4] Create webpage with text input boxes for username and password and a second password verification box for creating a user account. Secondary password box should verify that the passwords match. Each text for now should be at least 4 characters long --- front/static/signup.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/front/static/signup.html b/front/static/signup.html index 5282bbc..a8905a4 100644 --- a/front/static/signup.html +++ b/front/static/signup.html @@ -8,4 +8,28 @@ Sign up + +

Sign up page

+
+ User Name:
+ Password:
+ Confirm Password:
+ + Return to main menu +
+ + \ No newline at end of file From c2194a4c0aac3faab4598c21f1ea49e2cd2fefa1 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 13 Jan 2019 17:48:06 -0800 Subject: [PATCH 2/4] Separate javascript from html file --- front/static/signup.html | 15 +-------------- front/static/signupPage.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 front/static/signupPage.js diff --git a/front/static/signup.html b/front/static/signup.html index a8905a4..4db8d4b 100644 --- a/front/static/signup.html +++ b/front/static/signup.html @@ -18,18 +18,5 @@ Return to main menu - + \ No newline at end of file diff --git a/front/static/signupPage.js b/front/static/signupPage.js new file mode 100644 index 0000000..be8ca6c --- /dev/null +++ b/front/static/signupPage.js @@ -0,0 +1,12 @@ +var password = document.getElementById("password"); +var confirm_password = document.getElementById("confirmPassword"); +function validatePassword(){ + if(password.value != confirm_password.value) { + confirm_password.setCustomValidity("Passwords Don't Match"); + } + else { + confirm_password.setCustomValidity(''); + } +} +password.onchange = validatePassword; +confirm_password.onkeyup = validatePassword; \ No newline at end of file From c53a31a32f328f332c173b80bf0781db978e3a4c Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 13 Jan 2019 17:49:57 -0800 Subject: [PATCH 3/4] Removing specifying type in index.html --- front/static/signup.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/static/signup.html b/front/static/signup.html index 4db8d4b..43a62cd 100644 --- a/front/static/signup.html +++ b/front/static/signup.html @@ -18,5 +18,5 @@ Return to main menu - + \ No newline at end of file From f9ef59bc9c864735d7373f65a4c28b4c94bc33b8 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 13 Jan 2019 18:05:45 -0800 Subject: [PATCH 4/4] Removing specifying type in index.html --- front/static/signupPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/static/signupPage.js b/front/static/signupPage.js index be8ca6c..5fef862 100644 --- a/front/static/signupPage.js +++ b/front/static/signupPage.js @@ -1,5 +1,5 @@ -var password = document.getElementById("password"); -var confirm_password = document.getElementById("confirmPassword"); +const password = document.getElementById("password"); +const confirm_password = document.getElementById("confirmPassword"); function validatePassword(){ if(password.value != confirm_password.value) { confirm_password.setCustomValidity("Passwords Don't Match");