function _ga_login_create_form in Google Authenticator login 7
Form to create a new code - step 1.
1 call to _ga_login_create_form()
- ga_login_create_form in ./
ga_login.pages.inc - Form to create a new code.
File
- ./
ga_login.pages.inc, line 131 - ga_login pages.
Code
function _ga_login_create_form($form, &$form_state, $account) {
$form['info'] = array(
'#type' => 'item',
'#markup' => t('Everytime you submit this form a new key will be generated and you will have to re-enter the data in your mobile app.'),
'#weight' => -1,
);
$form['uid'] = array(
'#type' => 'value',
'#value' => $account->uid,
);
$form['tokentype'] = array(
'#title' => t('Code type'),
'#type' => 'select',
'#options' => array(
'TOTP' => t('Time-based code'),
'HOTP' => t('Counter-based code'),
),
'#default_value' => 'TOTP',
'#required' => TRUE,
'#description' => t('Select the type of code you want to create.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Create code'),
);
return $form;
}