From c39f980942cf7e4b291a4f7faa567f966ad9edd6 Mon Sep 17 00:00:00 2001 From: Withington Date: Sat, 20 May 2017 18:44:34 +0100 Subject: [PATCH 1/5] Change password, working version. --- static/assets/js/phenopolis.js | 4 ++-- templates/components/change_password_modal.html | 8 ++++++-- views/__init__.py | 3 ++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/static/assets/js/phenopolis.js b/static/assets/js/phenopolis.js index c078e6b..f1d4b92 100644 --- a/static/assets/js/phenopolis.js +++ b/static/assets/js/phenopolis.js @@ -150,7 +150,7 @@ if (!PP) { new_password_2: { equalTo: 'Both new passwords must match.' } - } + }, submitHandler: function(form) { $('#auth_modal').modal({ dismissible: false, endingTop: '20%' }); $('#auth_modal').modal('open'); @@ -168,7 +168,7 @@ if (!PP) { $('#change_password_successful').show(); $("#change_password_successful").text(data.success); }, - error: function (xhr, msg) { + error: function (data, msg) { $('#auth_modal').modal('close'); $("#username, #password, #new_password_1, #new_password_2").addClass("invalid"); $("#username, #password, #new_password_1, #new_password_2").prop("aria-invalid", "true"); diff --git a/templates/components/change_password_modal.html b/templates/components/change_password_modal.html index 1213ac2..c095601 100644 --- a/templates/components/change_password_modal.html +++ b/templates/components/change_password_modal.html @@ -4,8 +4,12 @@ close

Change Password

-
+
+ lock + + +
lock @@ -26,7 +30,7 @@

Change Password


Contact us if you continue to have issues.

- +