diff options
Diffstat (limited to 'django/srpproject')
-rw-r--r-- | django/srpproject/srp/views.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/django/srpproject/srp/views.py b/django/srpproject/srp/views.py index 7df7ee6..caa6076 100644 --- a/django/srpproject/srp/views.py +++ b/django/srpproject/srp/views.py @@ -79,7 +79,17 @@ function register() else if(document.getElementById("srp_password").value == "") alert("Password cannot be blank"); else - srp_register(); + { + var username = document.getElementById("srp_username").value; + var password = document.getElementById("srp_password").value; + var url = window.location.protocol+"//"+window.location.host+"/srp/"; + srp = new SRP(username, password, "django", url); + srp.success = function() + { + alert("We win"); + }; + srp.register(); + } return false; }; function srp_success() |