diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-12-03 06:27:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 06:27:29 +0300 |
commit | 284bdc0816dd2eff4010e4be42812ff3cc7e25e1 (patch) | |
tree | 88c60d0e72bae97b5467c5ad7693a64dd477bf3e /plugins/TwoFactorAuth/FormTwoFactorAuthCode.php | |
parent | e679e0383496383b00f95fd5fd0e42eed4ca49fe (diff) |
Implement Two Factor Authentication (#13670)
Diffstat (limited to 'plugins/TwoFactorAuth/FormTwoFactorAuthCode.php')
-rw-r--r-- | plugins/TwoFactorAuth/FormTwoFactorAuthCode.php | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/TwoFactorAuth/FormTwoFactorAuthCode.php b/plugins/TwoFactorAuth/FormTwoFactorAuthCode.php new file mode 100644 index 0000000000..e621d7846e --- /dev/null +++ b/plugins/TwoFactorAuth/FormTwoFactorAuthCode.php @@ -0,0 +1,33 @@ +<?php +/** + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ +namespace Piwik\Plugins\TwoFactorAuth; + +use Piwik\Piwik; +use Piwik\QuickForm2; + +/** + * + */ +class FormTwoFactorAuthCode extends QuickForm2 +{ + function __construct($id = 'login_form', $method = 'post', $attributes = null, $trackSubmit = false) + { + parent::__construct($id, $method, $attributes, $trackSubmit); + } + + function init() + { + $this->addElement('text', 'form_authcode') + ->addRule('required', + Piwik::translate('General_Required', 'Authentication code')); + + $this->addElement('hidden', 'form_nonce'); + + $this->addElement('submit', 'submit'); + } +} |