Merge remote-tracking branch 'origin/QA_4_8' into QA_4_8

This commit is contained in:
Weblate 2018-05-03 18:42:41 +02:00
commit 808e22fbf9
2 changed files with 9 additions and 5 deletions

View File

@ -90,13 +90,15 @@ class Application extends TwoFactorPlugin
*/
public function setup()
{
$secret = $this->_twofactor->config['settings']['secret'];
$inlineUrl = $this->_google2fa->getQRCodeInline(
'phpMyAdmin (' . $this->getAppId(false) . ')',
$this->_twofactor->user,
$this->_twofactor->config['settings']['secret']
$secret
);
return Template::get('login/twofactor/application_configure')->render([
'image' => $inlineUrl,
'secret' => $secret
]);
}
@ -139,4 +141,3 @@ class Application extends TwoFactorPlugin
return __('Provides authentication using HOTP and TOTP applications such as FreeOTP, Google Authenticator or Authy.');
}
}

View File

@ -1,10 +1,13 @@
{{ Url_getHiddenInputs() }}
<p>
{% trans "Please scan following QR code into the two-factor authentication app on your device and enter authentication code it generates." %}
{% trans "Please scan following QR code into the two-factor authentication app on your device and enter authentication code it generates." %}
</p>
<p>
<img src="{{ image }}" />
<img src="{{ image }}">
</p>
<p>
<label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" autocomplete="off" /></label>
{% trans "Secret/key:" %} <strong>{{ secret }}</strong>
</p>
<p>
<label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" autocomplete="off"></label>
</p>