mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
register: minor fixes and template cleanup
This commit is contained in:
@@ -978,7 +978,7 @@ class Enotify {
|
||||
|
||||
$x = [
|
||||
'notify_link' => z_root() . '/admin/accounts',
|
||||
'name' => (($rr['reg_email']) ? $rr['reg_email'] : $rr['reg_did2']),
|
||||
'name' => $rr['reg_did2'],
|
||||
//'addr' => '',
|
||||
'photo' => z_root() . '/' . get_default_profile_photo(48),
|
||||
'when' => datetime_convert('UTC', date_default_timezone_get(),$rr['reg_created']),
|
||||
|
||||
@@ -299,7 +299,7 @@ class Accounts {
|
||||
'$sel_deny' => t('Deny selected'),
|
||||
'$sel_aprv' => t('Approve selected'),
|
||||
'$h_pending' => t('Verified registrations waiting for approval'),
|
||||
'$th_pending' => array(t('Request date'), 'dId2', t('Email'), 'IP', t('IP Count')),
|
||||
'$th_pending' => array(t('Request date'), 'dId2', t('Email'), 'IP', t('Requests')),
|
||||
'$no_pending' => t('No verified registrations.'),
|
||||
'$approve' => t('Approve'),
|
||||
'$deny' => t('Deny'),
|
||||
@@ -330,6 +330,7 @@ class Accounts {
|
||||
'$tao' => $tao,
|
||||
'$pending' => $pending,
|
||||
'$users' => $users,
|
||||
'$msg' => t('Message')
|
||||
));
|
||||
$o .= paginate($a);
|
||||
|
||||
|
||||
@@ -532,17 +532,13 @@ class Register extends Controller {
|
||||
|
||||
$invite_code = array('invite_code', t('Please enter your invitation code'), ((x($_REQUEST,'invite_code')) ? strip_tags(trim($_REQUEST['invite_code'])) : ""));
|
||||
|
||||
$name = array('name', t('Your name'),
|
||||
((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Real names are preferred.'));
|
||||
$name = array('name', t('Your name'), ((x($_REQUEST,'name')) ? $_REQUEST['name'] : ''), t('Real name is preferred'), '', '', $duty['atform']);
|
||||
$nickhub = '@' . str_replace(array('http://','https://','/'), '', get_config('system','baseurl'));
|
||||
$nickname = array('nickname', t('Choose a short nickname'),
|
||||
((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''),
|
||||
sprintf( t('Your nickname will be used to create an easy to remember channel address e.g. nickname%s'),
|
||||
$nickhub));
|
||||
$nickname = array('nickname', t('Choose a short nickname'), ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : ''), t('Your nickname will be used to create an easy to remember channel address'), '', '', $duty['atform']);
|
||||
|
||||
$tos = array('tos', $label_tos, '', '', array(t('no'),t('yes')));
|
||||
$tos = array('tos', $label_tos, ((x($_REQUEST,'tos')) ? $_REQUEST['tos'] : ''), '', [t('no'),t('yes')], $duty['atform']);
|
||||
|
||||
$register_msg = ['register_msg', t('Why do you want to join this hub?')];
|
||||
$register_msg = ['register_msg', t('Why do you want to join this hub?'), ((x($_REQUEST,'register_msg')) ? $_REQUEST['register_msg'] : '')];
|
||||
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
@@ -571,6 +567,7 @@ class Register extends Controller {
|
||||
'$pass1' => $password,
|
||||
'$pass2' => $password2,
|
||||
'$submit' => t('Register'),
|
||||
'$nickhub' => $nickhub
|
||||
|
||||
));
|
||||
|
||||
|
||||
@@ -35,17 +35,11 @@ $(document).ready(function() {
|
||||
|
||||
if (tao.zar.patema.test(tao.zar.form.email) == false ) {
|
||||
$('#help_email').removeClass('text-muted').addClass('text-danger').html(aStr['email_not_valid']);
|
||||
zFormError('#help_email',true);
|
||||
} else {
|
||||
$.get('register/email_check.json?f=&email=' + encodeURIComponent(tao.zar.form.email), function(data) {
|
||||
$('#help_email').removeClass('text-muted').addClass('text-danger').html(data.message);
|
||||
zFormError('#help_email',data.error);
|
||||
});
|
||||
}
|
||||
|
||||
if ($('#id_email').val().length > 0) {
|
||||
$('#newchannel-submit-button').removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
$('#id_password').change(function() {
|
||||
@@ -74,7 +68,7 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
$('#id_name').blur(function() {
|
||||
$('#name-spinner').show();
|
||||
$('#name-spinner').fadeIn();
|
||||
var zreg_name = $('#id_name').val();
|
||||
$.get('new_channel/autofill.json?f=&name=' + encodeURIComponent(zreg_name),function(data) {
|
||||
$('#id_nickname').val(data);
|
||||
@@ -82,15 +76,13 @@ $(document).ready(function() {
|
||||
$('#help_name').html('');
|
||||
zFormError('#help_name',data.error);
|
||||
}
|
||||
$('#name-spinner').hide();
|
||||
$('#name-spinner').fadeOut();
|
||||
});
|
||||
});
|
||||
|
||||
$('#id_nickname').blur(function() {
|
||||
if($('#id_name').val() === '')
|
||||
return;
|
||||
|
||||
$('#nick-spinner').show();
|
||||
$('#nick-spinner').fadeIn();
|
||||
$('#nick-hub').fadeOut();
|
||||
var zreg_nick = $('#id_nickname').val();
|
||||
$.get('new_channel/checkaddr.json?f=&nick=' + encodeURIComponent(zreg_nick),function(data) {
|
||||
$('#id_nickname').val(data);
|
||||
@@ -98,12 +90,13 @@ $(document).ready(function() {
|
||||
$('#help_nickname').html('');
|
||||
zFormError('#help_nickname',data.error);
|
||||
}
|
||||
$('#nick-spinner').hide();
|
||||
$('#nick-spinner').fadeOut();
|
||||
$('#nick-hub').fadeIn();
|
||||
});
|
||||
});
|
||||
|
||||
$('#register-form').submit(function(e) {
|
||||
if ( $('.zform-error').length > 0 ) {
|
||||
if ($('.zform-error').length > 0) {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -780,7 +780,7 @@ div.jGrowl div.info {
|
||||
}
|
||||
#jGrowl.top-right {
|
||||
top: 4.5rem;
|
||||
right: 15px;
|
||||
right: .25rem;
|
||||
}
|
||||
|
||||
div.jGrowl div.jGrowl-notification {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
{{foreach $pending as $n => $u}}
|
||||
<tr class="zebra zebra{{$u.reg_z}}">
|
||||
<tr class="">
|
||||
<td class="created">{{$u.reg_created}}</td>
|
||||
<td class="email">{{$u.reg_did2}}</td>
|
||||
<td class="email">{{$u.reg_email}}</td>
|
||||
@@ -31,7 +31,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7">{{$u.msg}}</td>
|
||||
<td colspan="7"><strong>{{$msg}}:</strong> {{$u.msg}}</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
|
||||
@@ -35,12 +35,13 @@
|
||||
|
||||
{{if $auto_create}}
|
||||
<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>
|
||||
{{include file="field_input.tpl" field=[$name.0,$name.1,"","","",$atform]}}
|
||||
<div id="name-spinner" class="spinner-wrapper position-absolute" style="top: 2.5rem; right: 0.75rem;"><div class="spinner s"></div></div>
|
||||
{{include file="field_input.tpl" field=$name}}
|
||||
</div>
|
||||
<div class="position-relative">
|
||||
<div id="nick-spinner" class="spinner-wrapper position-absolute" style="top: 2.5rem; right: 0.5rem;"><div class="spinner s"></div></div>
|
||||
{{include file="field_input.tpl" field=[$nickname.0,$nickname.1,"","","",$atform]}}
|
||||
<div id="nick-hub" class="position-absolute" style="top: 2.3rem; right: 0.75rem;"><span class="text-muted">{{$nickhub}}</span></div>
|
||||
<div id="nick-spinner" class="spinner-wrapper position-absolute" style="top: 2.5rem; right: 0.75rem;"><div class="spinner s"></div></div>
|
||||
{{include file="field_input.tpl" field=$nickname}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{include file="field_input.tpl" field=$email}}
|
||||
@@ -50,7 +51,7 @@
|
||||
{{include file="field_textarea.tpl" field=$register_msg}}
|
||||
{{/if}}
|
||||
{{if $enable_tos}}
|
||||
{{include file="field_checkbox.tpl" field=[$tos.0,$tos.1,"","","",$atform]}}
|
||||
{{include file="field_checkbox.tpl" field=$tos}}
|
||||
{{else}}
|
||||
<input type="hidden" name="tos" value="1" />
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user