You are here

public function TfaBasicSmsSetup::getSetupForm in TFA Basic plugins 7

@copydoc TfaSetupPluginInterface::getSetupForm()

Overrides TfaSetupPluginInterface::getSetupForm

File

includes/tfa_sms.inc, line 204

Class

TfaBasicSmsSetup
Class TfaBasicSmsSetup

Code

public function getSetupForm(array $form, array &$form_state) {
  $form['sms_code'] = array(
    '#type' => 'textfield',
    '#title' => t('Verification Code'),
    '#required' => TRUE,
    '#description' => t('Enter @length-character code sent to your device.', array(
      '@length' => $this->codeLength,
    )),
  );
  if (module_exists('elements')) {
    $form['sms_code']['#type'] = 'numberfield';
  }
  $form['actions']['verify'] = array(
    '#type' => 'submit',
    '#value' => t('Verify and save'),
  );
  return $form;
}