Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2018-12-03 06:27:29 +0300
committerGitHub <noreply@github.com>2018-12-03 06:27:29 +0300
commit284bdc0816dd2eff4010e4be42812ff3cc7e25e1 (patch)
tree88c60d0e72bae97b5467c5ad7693a64dd477bf3e /plugins/TwoFactorAuth/FormTwoFactorAuthCode.php
parente679e0383496383b00f95fd5fd0e42eed4ca49fe (diff)
Implement Two Factor Authentication (#13670)
Diffstat (limited to 'plugins/TwoFactorAuth/FormTwoFactorAuthCode.php')
-rw-r--r--plugins/TwoFactorAuth/FormTwoFactorAuthCode.php33
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');
+ }
+}