function tfa_test_setup_form in Two-factor Authentication (TFA) 7.2
The multi-step form builder for TfaSetup().
1 string reference to 'tfa_test_setup_form'
- tfa_test_menu in tests/
tfa_test.module - Implements hook_menu().
File
- tests/
tfa_test.module, line 123 - A mock module for testing TFA.
Code
function tfa_test_setup_form($form, &$form_state, $account) {
if (empty($form_state['storage'])) {
$form['start'] = array(
'#type' => 'submit',
'#value' => t('Setup send'),
);
}
else {
$tfa_setup = $form_state['storage']['tfa_setup'];
$form = $tfa_setup
->getForm($form, $form_state);
}
// Set account element.
$form['account'] = array(
'#type' => 'value',
'#value' => $account,
);
return $form;
}