aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-05-07 08:15:06 +0000
committerMario <mario@mariovavti.com>2021-05-07 08:15:06 +0000
commit9ad2b017e235e26f0d7fee26e2fc9dd532dd8629 (patch)
tree1a5c2fda39d9d2e714930506961e778e8f703e26
parent1fd5f5c893d224a523ecf279ec65c1cf933b2065 (diff)
downloadvolse-hubzilla-9ad2b017e235e26f0d7fee26e2fc9dd532dd8629.tar.gz
volse-hubzilla-9ad2b017e235e26f0d7fee26e2fc9dd532dd8629.tar.bz2
volse-hubzilla-9ad2b017e235e26f0d7fee26e2fc9dd532dd8629.zip
register: fix language issue and add additional info to the infobox if email verification is configured
-rw-r--r--Zotlabs/Module/Regate.php8
-rw-r--r--Zotlabs/Module/Register.php4
-rw-r--r--view/en/register_verify_member.tpl6
-rw-r--r--view/tpl/regate.tpl2
-rw-r--r--view/tpl/regate_pre.tpl3
5 files changed, 15 insertions, 8 deletions
diff --git a/Zotlabs/Module/Regate.php b/Zotlabs/Module/Regate.php
index 155f818ef..15bc1da38 100644
--- a/Zotlabs/Module/Regate.php
+++ b/Zotlabs/Module/Regate.php
@@ -325,7 +325,7 @@ class Regate extends \Zotlabs\Web\Controller {
$r = $r[0];
// provide a button in case
- $resend = ($r['reg_didx'] == 'e') ? t('Resend') : false;
+ $resend = (($r['reg_didx'] == 'e') ? t('Resend email') : '');
// is still only instance admins intervention required?
if ($r['reg_flags'] == ACCOUNT_PENDING) {
@@ -373,6 +373,7 @@ class Regate extends \Zotlabs\Web\Controller {
'$form_security_token' => get_form_security_token("regate"),
'$title' => t('Registration verification'),
'$desc' => t('Please enter your verification token for ID'),
+ '$email_extra' => (($didx === 'e') ? t('Please check your email!') : ''),
'$id' => $did2,
// we might consider to not provide $pin if a registration delay is configured
// and the pin turns out to be readable by bots
@@ -399,6 +400,8 @@ class Regate extends \Zotlabs\Web\Controller {
return $o;
}
+ $email_extra = (($didx === 'e') ? t('Please check your email!') : '');
+
$o = replace_macros(get_markup_template('regate_pre.tpl'), [
'$title' => t('Registration verification'),
'$now' => $nowfmt,
@@ -406,7 +409,8 @@ class Regate extends \Zotlabs\Web\Controller {
'$countdown' => datetime_convert('UTC', 'UTC', $r['reg_startup'], 'c'),
'$strings' => [
t('Hold on, you can start verification in'),
- t('You will require the verification token for ID')
+ t('You will require the verification token for ID'),
+ $email_extra
]
]);
}
diff --git a/Zotlabs/Module/Register.php b/Zotlabs/Module/Register.php
index ecdcd90dd..683fcdc36 100644
--- a/Zotlabs/Module/Register.php
+++ b/Zotlabs/Module/Register.php
@@ -322,7 +322,7 @@ class Register extends Controller {
$did2 = $email;
$didx = 'e';
- push_lang(($reg['lang']) ? $reg['lang'] : 'en');
+ push_lang(($reg['lang']) ? $reg['lang'] : App::$language);
$reonar['from'] = get_config('system', 'from_email');
$reonar['to'] = $email;
$reonar['subject'] = sprintf( t('Registration confirmation for %s'), get_config('system','sitename'));
@@ -375,7 +375,7 @@ class Register extends Controller {
dbesc($regexpire),
dbesc($email),
dbesc($password),
- dbesc(substr(get_best_language(),0,2)),
+ dbesc(App::$language),
dbesc($ip),
dbesc(json_encode($reonar))
);
diff --git a/view/en/register_verify_member.tpl b/view/en/register_verify_member.tpl
index 926efbd11..a4a3079a0 100644
--- a/view/en/register_verify_member.tpl
+++ b/view/en/register_verify_member.tpl
@@ -10,7 +10,7 @@ Login with the password you chose at registration.
We need to verify your email address in order to give you full access.
-Your validation token is
+Your verification token is
{{$hash}}
@@ -18,7 +18,7 @@ Your validation token is
This token is valid from {{$timeframe.0}} UTC until {{$timeframe.1}} UTC
-{{/if}}
+{{/if}}
If you registered this account, please enter the validation code when requested or visit the following link:
{{$siteurl}}/regate/{{$mail}}
@@ -26,7 +26,7 @@ If you registered this account, please enter the validation code when requested
To deny the request and remove the account, please visit:
-{{$siteurl}}/regate/{{$mail}}{{if $ko}}/{{$ko}}{{/if}}
+{{$siteurl}}/regate/{{$mail}}{{if $ko}}/{{$ko}}{{/if}}
Thank you!
diff --git a/view/tpl/regate.tpl b/view/tpl/regate.tpl
index b9239ee46..57ca2c1b3 100644
--- a/view/tpl/regate.tpl
+++ b/view/tpl/regate.tpl
@@ -11,6 +11,8 @@
<div class="section-content-info-wrapper">
{{$desc}} {{$id}}
<div class="h3">{{$pin}}</div>
+ {{if $email_extra}}<b>{{$email_extra}}</b>{{/if}}
+
</div>
<form action="regate/{{$did2}}" method="post">
diff --git a/view/tpl/regate_pre.tpl b/view/tpl/regate_pre.tpl
index 7596f6846..b23797add 100644
--- a/view/tpl/regate_pre.tpl
+++ b/view/tpl/regate_pre.tpl
@@ -15,13 +15,14 @@
<div class="section-content-info-wrapper">
{{$strings.1}} {{$id}}
<div class="h3">{{$pin}}</div>
+ {{if $strings.2}}<b>{{$strings.2}}</b>{{/if}}
</div>
<div class="d-none">
{{$strings.2}}<br>
<span id="register_start" data-utc="{{$regdelay}}" class="register_date">
{{$regdelay}}
</span>
- &nbsp;&dash;&nbsp;
+ &nbsp;&dash;&nbsp;
<span data-utc="{{$regexpire}}" class="register_date">
{{$regexpire}}
</span>