aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zregister.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-16 00:51:03 -0700
committerfriendica <info@friendica.com>2012-08-16 00:51:03 -0700
commiteb911443aaee63f414cd95de4dabf60e2f14a994 (patch)
tree7c8eb42e2602b572f430474648aec611f0c20c47 /mod/zregister.php
parent5b547ae991624924c0ef11dbe36ae57f5ec2182b (diff)
downloadvolse-hubzilla-eb911443aaee63f414cd95de4dabf60e2f14a994.tar.gz
volse-hubzilla-eb911443aaee63f414cd95de4dabf60e2f14a994.tar.bz2
volse-hubzilla-eb911443aaee63f414cd95de4dabf60e2f14a994.zip
more zregister cleanup and theme separation
Diffstat (limited to 'mod/zregister.php')
-rw-r--r--mod/zregister.php51
1 files changed, 3 insertions, 48 deletions
diff --git a/mod/zregister.php b/mod/zregister.php
index 2cde25469..da3bc9f36 100644
--- a/mod/zregister.php
+++ b/mod/zregister.php
@@ -11,55 +11,10 @@ function zregister_init(&$a) {
json_return_and_die($result);
}
- $pw1 = t("Password too short");
- $pw2 = t("Passwords do not match");
-
- $a->page['htmlhead'] .= <<< EOT
-<script>
- function zFormError(elm,x) {
- if(x) {
- $(elm).addClass("zform-error");
- $(elm).removeClass("zform-ok");
- }
- else {
- $(elm).addClass("zform-ok");
- $(elm).removeClass("zform-error");
- }
+ if($cmd === 'password_check.json') {
+ $result = check_account_password($_REQUEST['password']);
+ json_return_and_die($result);
}
- $(document).ready(function() {
- $("#zregister-email").blur(function() {
- var zreg_email = $("#zregister-email").val();
- $.get("zregister/email_check.json?f=&email=" + encodeURIComponent(zreg_email),function(data) {
- $("#zregister-email-feedback").html(data.message);
- zFormError("#zregister-email-feedback",data.error);
- });
- });
- $("#zregister-password").blur(function() {
- if(($("#zregister-password").val()).length < 6 ) {
- $("#zregister-password-feedback").html("$pw1");
- zFormError("#zregister-password-feedback",true);
- }
- else {
- $("#zregister-password-feedback").html("");
- zFormError("#zregister-password-feedback",false);
- }
- });
- $("#zregister-password2").blur(function() {
- if($("#zregister-password").val() != $("#zregister-password2").val()) {
- $("#zregister-password2-feedback").html("$pw2");
- zFormError("#zregister-password2-feedback",true);
- }
- else {
- $("#zregister-password2-feedback").html("");
- zFormError("#zregister-password2-feedback",false);
- }
- });
- });
-
-</script>
-
-EOT;
-
}