You are here

public function TfaBasicRecoveryCodeSetup::getSetupForm in TFA Basic plugins 7

@copydoc TfaSetupPluginInterface::getSetupForm()

Overrides TfaSetupPluginInterface::getSetupForm

File

includes/tfa_recovery.inc, line 153
class for TFA Basic

Class

TfaBasicRecoveryCodeSetup
Class TfaBasicRecoveryCode

Code

public function getSetupForm(array $form, array &$form_state) {
  $this->codes = $this
    ->generateCodes();
  $form['codes'] = array(
    '#type' => 'item',
    '#title' => t('Your recovery codes'),
    '#description' => t('Print, save, or write down these codes for use in case you are without your application and need to log in.'),
    '#markup' => theme('item_list', array(
      'items' => $this->codes,
    )),
    '#attributes' => array(
      'class' => array(
        'recovery-codes',
      ),
    ),
  );
  $form['actions']['save'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}