Remove duplicated input in application_configure.twig

Some coding style fixes.

Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
This commit is contained in:
Maurício Meneghini Fauth 2018-05-03 13:40:33 -03:00
parent 3054999afe
commit e7a6ff8a0e
2 changed files with 7 additions and 7 deletions

View File

@ -90,14 +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' => $_SESSION['2fa_application_key']
'secret' => $secret
]);
}

View File

@ -1,14 +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>
{% trans "Secret/key:" %} <b>{{ secret }}</b>
{% trans "Secret/key:" %} <strong>{{ secret }}</strong>
</p>
<p>
<label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" /></label>
<label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" autocomplete="off" /></label>
<label>{% trans "Authentication code:" %} <input type="text" name="2fa_code" autocomplete="off"></label>
</p>