aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/public/js/views/reset.js
diff options
context:
space:
mode:
authorDennis Eriksen <dennis.se@gmail.com>2013-03-20 12:43:33 +0100
committerDennis Eriksen <dennis.se@gmail.com>2013-03-20 12:43:33 +0100
commit266767e6b31d4799b218a7dc9ffd0d6f2eca92a8 (patch)
treee3e68b3acdfb276cadcc23d0028a6c1dd3bc8f21 /public/js/views/reset.js
parentEdited "Sign in" button - for fun (diff)
downloadDivid-266767e6b31d4799b218a7dc9ffd0d6f2eca92a8.tar.gz
login screen
Diffstat (limited to 'public/js/views/reset.js')
-rw-r--r--public/js/views/reset.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/public/js/views/reset.js b/public/js/views/reset.js
new file mode 100644
index 0000000..c6a6166
--- /dev/null
+++ b/public/js/views/reset.js
@@ -0,0 +1,27 @@
+
+$(document).ready(function(){
+
+ var rv = new ResetValidator();
+
+ $('#set-password-form').ajaxForm({
+ beforeSubmit : function(formData, jqForm, options){;
+ rv.hideAlert();
+ if (rv.validatePassword($('#pass-tf').val()) == false){
+ return false;
+ } else{
+ return true;
+ }
+ },
+ success : function(responseText, status, xhr, $form){
+ rv.showSuccess("Your password has been reset.");
+ setTimeout(function(){ window.location.href = '/'; }, 3000);
+ },
+ error : function(){
+ rv.showAlert("I'm sorry something went wrong, please try again.");
+ }
+ });
+
+ $('#set-password').modal('show');
+ $('#set-password').on('shown', function(){ $('#pass-tf').focus(); })
+
+}); \ No newline at end of file