Send prefix to 2FA templates

This commit is contained in:
Maxime Besson 2022-09-15 17:28:07 +02:00
parent 7bb84f5bb1
commit 5f129f90d4
2 changed files with 6 additions and 1 deletions

View File

@ -492,11 +492,14 @@ sub _displayRegister {
unless $m;
return $self->p->sendError( $req, 'Registration not authorized', 403 )
unless $m->{r}->( $req, $req->userData );
my $prefix = $m->{m}->prefix;
return $self->p->sendHtml(
$req,
$m->{m}->template,
params => {
MAIN_LOGO => $self->conf->{portalMainLogo},
PREFIX => $prefix,
"PREFIX_$prefix" => 1,
LANGS => $self->conf->{showLanguages},
MSG => $self->canUpdateSfa($req) || $m->{m}->welcome,
ALERT => ( $self->canUpdateSfa($req) ? 'warning' : 'positive' ),

View File

@ -174,13 +174,15 @@ sub sendCodeForm {
if $stayconnected;
# Prepare form
my $prefix = $self->prefix;
return $self->p->sendHtml(
$req,
'ext2fcheck',
params => {
MAIN_LOGO => $self->conf->{portalMainLogo},
SKIN => $self->p->getSkin($req),
PREFIX => $self->prefix,
"PREFIX_$prefix" => 1,
PREFIX => $prefix,
(
$self->resend_interval
? ( RESENDTARGET => '/'