activeFormClass;
$this->title = Yii::t('user', 'Two-Factor Authentication');
$this->params['breadcrumbs'][] = ['label' => Yii::t('user', 'Settings'), 'url' => ['settings/account']];
$this->params['breadcrumbs'][] = $this->title;
?>
= Html::encode($this->title) ?>
= Yii::t('user', 'Two-factor authentication is enabled.') ?>
= Yii::t('user', 'You have {count} backup codes remaining.', ['count' => $backupCodesCount]) ?>
= Html::a(
Yii::t('user', 'View Backup Codes'),
['backup-codes'],
['class' => 'btn btn-secondary']
) ?>
= Yii::t('user', 'Disable Two-Factor Authentication') ?>
= Yii::t('user', 'Disabling two-factor authentication will make your account less secure.') ?>
= Html::beginForm(['disable'], 'post') ?>
= Html::submitButton(
Yii::t('user', 'Disable Two-Factor Authentication'),
[
'class' => 'btn btn-danger',
'data-confirm' => Yii::t('user', 'Are you sure you want to disable two-factor authentication?'),
]
) ?>
= Html::endForm() ?>
= Yii::t('user', 'Two-factor authentication is not enabled. Enable it to add an extra layer of security to your account.') ?>
= Yii::t('user', 'Set Up Two-Factor Authentication') ?>
- = Yii::t('user', 'Install an authenticator app on your phone (e.g., Google Authenticator, Authy, 1Password).') ?>
- = Yii::t('user', 'Scan the QR code below with your authenticator app.') ?>
- = Yii::t('user', 'Enter the 6-digit code from your app to verify setup.') ?>
= Yii::t('user', "Can't scan the code? Enter this key manually:") ?>
= Html::encode($secret) ?>
['enable']] + $module->formFieldConfig) ?>
= Html::activeHiddenInput($setupForm, 'secret') ?>
= $form->field($setupForm, 'code')->textInput([
'autofocus' => true,
'autocomplete' => 'one-time-code',
'inputmode' => 'numeric',
'pattern' => '[0-9]*',
'maxlength' => 6,
]) ?>
= Html::submitButton(Yii::t('user', 'Enable Two-Factor Authentication'), ['class' => 'btn btn-primary']) ?>