aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-04-09 09:49:36 +0000
committerMario <mario@mariovavti.com>2021-04-09 09:49:36 +0000
commit01b081d809d128e0922fb404921f452c51c2ddb2 (patch)
treedb100aa4c3b257943b95ab192514a8a93cfa6ba9 /view
parenta34d8852b6695086ef3c9f5ff882d0d033f7d4a5 (diff)
downloadvolse-hubzilla-01b081d809d128e0922fb404921f452c51c2ddb2.tar.gz
volse-hubzilla-01b081d809d128e0922fb404921f452c51c2ddb2.tar.bz2
volse-hubzilla-01b081d809d128e0922fb404921f452c51c2ddb2.zip
register: only return verified registrations in get_pending_accounts(), more invite handling fixes
Diffstat (limited to 'view')
-rw-r--r--view/js/mod_register.js7
-rw-r--r--view/tpl/js_strings.tpl3
-rw-r--r--view/tpl/register.tpl19
3 files changed, 16 insertions, 13 deletions
diff --git a/view/js/mod_register.js b/view/js/mod_register.js
index 7ad972c79..948ba756b 100644
--- a/view/js/mod_register.js
+++ b/view/js/mod_register.js
@@ -10,7 +10,9 @@ $(document).ready(function() {
$(this).html(date.toLocaleString(undefined, {weekday: 'short', hour: 'numeric', minute: 'numeric'}));
});
- $('#zar014').click( function () { $('#zar015').toggle(); });
+ $('#zar014').click( function () {
+ $('#zar015').toggle();
+ });
$('#id_invite_code').blur(function() {
if($('#id_invite_code').val() === '')
@@ -20,8 +22,9 @@ $(document).ready(function() {
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');
+ // email is always mandatory if using invite code
+ $('#help_email').removeClass('text-muted').addClass('text-danger').html(aStr['email_required']);
}
$('#invite-spinner').hide();
});
diff --git a/view/tpl/js_strings.tpl b/view/tpl/js_strings.tpl
index c0d8d104e..8f05165f1 100644
--- a/view/tpl/js_strings.tpl
+++ b/view/tpl/js_strings.tpl
@@ -72,7 +72,8 @@
'download_info' : "{{$download_info}}",
// mod register
- 'email_not_valid' : "{{$email_not_valid}}"
+ 'email_not_valid' : "{{$email_not_valid}}",
+ 'email_required' : "{{$email_required}}"
};
diff --git a/view/tpl/register.tpl b/view/tpl/register.tpl
index 7940b8945..fe67abe89 100644
--- a/view/tpl/register.tpl
+++ b/view/tpl/register.tpl
@@ -19,16 +19,6 @@
</div>
{{/if}}
- {{if $auto_create}}
- {{if $default_role}}
- <input type="hidden" name="permissions_role" value="{{$default_role}}" />
- {{else}}
- <div class="section-content-info-wrapper">
- {{$help_role}}
- </div>
- {{include file="field_select_grouped.tpl" field=$role}}
- {{/if}}
-
{{if $invitations}}
<a id="zar014" href="javascript:;" style="display: inline-block;">{{$haveivc}}</a>
<div id="zar015" style="display: none;">
@@ -39,6 +29,15 @@
</div>
{{/if}}
+ {{if $auto_create}}
+ {{if $default_role}}
+ <input type="hidden" name="permissions_role" value="{{$default_role}}" />
+ {{else}}
+ <div class="section-content-info-wrapper">
+ {{$help_role}}
+ </div>
+ {{include file="field_select_grouped.tpl" field=$role}}
+ {{/if}}
<div class="position-relative">
<div id="name-spinner" class="spinner-wrapper position-absolute" style="top: 2.5rem; right: 0.5rem;"><div class="spinner s"></div></div>