aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_register.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-04-08 19:55:53 +0000
committerMario <mario@mariovavti.com>2021-04-08 19:55:53 +0000
commit18b6d48944be414acc179fb82f458f996810e5a3 (patch)
tree4f45574a53e74d74293c6421103643249a4bf2b0 /view/js/mod_register.js
parentf3fa09fc91fe4ca2a44ee4f60d11c5ee70fcefad (diff)
downloadvolse-hubzilla-18b6d48944be414acc179fb82f458f996810e5a3.tar.gz
volse-hubzilla-18b6d48944be414acc179fb82f458f996810e5a3.tar.bz2
volse-hubzilla-18b6d48944be414acc179fb82f458f996810e5a3.zip
rgister: fixes for registering with invitecode outside of open hours
Diffstat (limited to 'view/js/mod_register.js')
-rw-r--r--view/js/mod_register.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/view/js/mod_register.js b/view/js/mod_register.js
index 19be1576f..7ad972c79 100644
--- a/view/js/mod_register.js
+++ b/view/js/mod_register.js
@@ -12,6 +12,21 @@ $(document).ready(function() {
$('#zar014').click( function () { $('#zar015').toggle(); });
+ $('#id_invite_code').blur(function() {
+ if($('#id_invite_code').val() === '')
+ return;
+
+ $('#invite-spinner').show();
+ var zreg_invite = $('#id_invite_code').val();
+ $.get('register/invite_check.json?f=&invite_code=' + encodeURIComponent(zreg_invite),function(data) {
+ if(!data.error) {
+ // FIXME: set email field to required -> $('#help_email')
+ $('#register-form input, #register-form button').removeAttr('disabled');
+ }
+ $('#invite-spinner').hide();
+ });
+ });
+
$('#id_email').change(function() {
tao.zar.form.email = $('#id_email').val();