From fda308146b87ff6dec2babbbed8c85998344bc5a Mon Sep 17 00:00:00 2001
From: RyoshiKayo
Date: Fri, 10 Mar 2017 08:26:05 -0800
Subject: [PATCH 1/2] Password verification.
---
public/js/dashboard.js | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/public/js/dashboard.js b/public/js/dashboard.js
index 76b8ec4..0818854 100644
--- a/public/js/dashboard.js
+++ b/public/js/dashboard.js
@@ -559,6 +559,10 @@ panel.changePassword = function(){
+
+
+
+
Set new password
`;
@@ -566,9 +570,18 @@ panel.changePassword = function(){
panel.page.appendChild(container);
document.getElementById('sendChangePassword').addEventListener('click', function(){
- panel.sendNewPassword(document.getElementById('password').value);
+ if (document.getElementById('password').value === document.getElementById('passwordTwo').value) {
+ panel.sendNewPassword(document.getElementById('password').value);
+ } else {
+ swal({
+ title: "Password Mismatch!",
+ text: 'Your passwords do not match, please try again.',
+ type: "error"
+ }, function() {
+ panel.changePassword();
+ });
+ }
});
-
}
panel.sendNewPassword = function(pass){
From 91d7cbdb6ce023428d6959b9b61ca6fdfc5b2256 Mon Sep 17 00:00:00 2001
From: Crawl
Date: Fri, 10 Mar 2017 18:19:25 +0100
Subject: [PATCH 2/2] Update dashboard.js
---
public/js/dashboard.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/public/js/dashboard.js b/public/js/dashboard.js
index 0818854..7309908 100644
--- a/public/js/dashboard.js
+++ b/public/js/dashboard.js
@@ -562,7 +562,7 @@ panel.changePassword = function(){
-
+
Set new password
`;
@@ -570,11 +570,11 @@ panel.changePassword = function(){
panel.page.appendChild(container);
document.getElementById('sendChangePassword').addEventListener('click', function(){
- if (document.getElementById('password').value === document.getElementById('passwordTwo').value) {
+ if (document.getElementById('password').value === document.getElementById('passwordConfirm').value) {
panel.sendNewPassword(document.getElementById('password').value);
} else {
swal({
- title: "Password Mismatch!",
+ title: "Password mismatch!",
text: 'Your passwords do not match, please try again.',
type: "error"
}, function() {