From 3406ce58cf3887a29fb4ac0166ad9b2ce49d0059 Mon Sep 17 00:00:00 2001 From: Jan Bader Date: Tue, 20 Dec 2016 14:34:29 +0100 Subject: [PATCH] Flash notice on submit if passwords don't match --- templates/register.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/templates/register.html b/templates/register.html index ceff61a..4723799 100644 --- a/templates/register.html +++ b/templates/register.html @@ -22,8 +22,16 @@ } $(document).ready(function () { - $("#password, #password_confirm").keyup(checkPasswordMatch); + $("#password, #password_confirm").keyup(checkPasswordMatchUi); + $('#invalidCredentials').hide(); $('#loginForm').ajaxForm({ + beforeSubmit: function(a, b, c) { + var match = checkPasswordMatch(); + if(!match){ + $("#divCheckPasswordMatch").fadeOut(300).fadeIn(300).fadeOut(300).fadeIn(300); + } + return match; + }, success: function() { window.location.href = "/api/v1/restricted"; }, @@ -55,6 +63,10 @@
+
+ Username already exists +
+