зеркало из https://github.com/nextcloud/spreed.git
Show "Wrong password" info when the conversation password was wrong
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
4474986a29
Коммит
8ee67f13c1
|
@ -179,7 +179,9 @@ class PageController extends Controller {
|
||||||
$this->talkSession->setPasswordForRoom($token, $token);
|
$this->talkSession->setPasswordForRoom($token, $token);
|
||||||
} else {
|
} else {
|
||||||
if ($passwordVerification['url'] === '') {
|
if ($passwordVerification['url'] === '') {
|
||||||
return new TemplateResponse($this->appName, 'authenticate', [], 'guest');
|
return new TemplateResponse($this->appName, 'authenticate', [
|
||||||
|
'wrongpw' => $password !== '',
|
||||||
|
], 'guest');
|
||||||
}
|
}
|
||||||
|
|
||||||
return new RedirectResponse($passwordVerification['url']);
|
return new RedirectResponse($passwordVerification['url']);
|
||||||
|
@ -232,7 +234,9 @@ class PageController extends Controller {
|
||||||
$this->talkSession->setPasswordForRoom($token, $token);
|
$this->talkSession->setPasswordForRoom($token, $token);
|
||||||
} else {
|
} else {
|
||||||
if ($passwordVerification['url'] === '') {
|
if ($passwordVerification['url'] === '') {
|
||||||
return new TemplateResponse($this->appName, 'authenticate', [], 'guest');
|
return new TemplateResponse($this->appName, 'authenticate', [
|
||||||
|
'wrongpw' => $password !== '',
|
||||||
|
], 'guest');
|
||||||
}
|
}
|
||||||
|
|
||||||
return new RedirectResponse($passwordVerification['url']);
|
return new RedirectResponse($passwordVerification['url']);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
?>
|
?>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<fieldset class="warning">
|
<fieldset class="warning">
|
||||||
<?php if (!isset($_['wrongpw'])){ ?>
|
<?php if (!$_['wrongpw']) { ?>
|
||||||
<div class="warning-info"><?php p($l->t('This conversation is password-protected')); ?></div>
|
<div class="warning-info"><?php p($l->t('This conversation is password-protected')); ?></div>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
|
<div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче