function miniorange_2fa_inline_registration::mo_auth_get_kba_authentication_form in Google Authenticator / 2 Factor Authentication - 2FA 8
Same name and namespace in other branches
- 8.2 src/Form/miniorange_2fa_inline_registration.php \Drupal\miniorange_2fa\form\miniorange_2fa_inline_registration::mo_auth_get_kba_authentication_form()
1 call to miniorange_2fa_inline_registration::mo_auth_get_kba_authentication_form()
File
- src/
Form/ miniorange_2fa_inline_registration.php, line 977
Class
Namespace
Drupal\miniorange_2fa\formCode
function mo_auth_get_kba_authentication_form(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
$prefixQuestion1 = '<div class="mo2f-modal">
<div class="mo2f-modal-content">
<div class="mo2f-modal-container mo2f-modal-header">Configure Security Questions (Step 5/5)</div>
<div class="mo2f-modal-container">';
$prefixQuestion1 .= '<div class="mo2f-info">Please choose your backup security questions:</div><div>
<div class="mo2f-kba-header mo2f-kba-row">
<div class="mo2f-kba-srno">Sr. No.</div>
<div class="mo2f-kba-question">Questions</div>
<div class="mo2f-kba-answer">Answers</div>
</div>
<div class="mo2f-kba-row">
<div class="mo2f-kba-srno">1.</div>
<div class="mo2f-kba-question">';
$suffixQuestion1 = '</div>';
$prefixAnswer1 = '<div class="mo2f-kba-answer">';
$suffixAnswer1 = '</div></div>';
$prefixQuestion2 = '<div class="mo2f-kba-row">
<div class="mo2f-kba-srno">2.</div>
<div class="mo2f-kba-question">';
$suffixQuestion2 = '</div>';
$prefixAnswer2 = '<div class="mo2f-kba-answer">';
$suffixAnswer2 = '</div></div>';
$prefixQuestion3 = '<div class="mo2f-kba-row">
<div class="mo2f-kba-srno">3.</div>
<div class="mo2f-kba-question">';
$suffixQuestion3 = '</div>';
$prefixAnswer3 = '<div class="mo2f-kba-answer">';
$suffixAnswer3 = '</div></div></div></div><div class="mo2f-modal-container mo2f-modal-footer">';
$options_one = array(
'What is your first company name?' => 'What is your first company name?',
'What was your childhood nickname?' => 'What was your childhood nickname?',
'In what city did you meet your spouse/significant other?' => 'In what city did you meet your spouse/significant other?',
'What is the name of your favorite childhood friend?' => 'What is the name of your favorite childhood friend?',
'What school did you attend for sixth grade?' => 'What school did you attend for sixth grade?',
);
$options_two = array(
'In what city or town was your first job?' => 'In what city or town was your first job?',
'What is your favourite sport?' => 'What is your favourite sport?',
'Who is your favourite sports player?' => 'Who is your favourite sports player?',
'What is your grandmothers maiden name?' => 'What is your grandmothers maiden name?',
'What was your first vehicles registration number?' => 'What was your first vehicles registration number?',
);
$form['mo_auth_question1'] = array(
'#type' => 'select',
'#options' => $options_one,
'#prefix' => $prefixQuestion1,
'#suffix' => $suffixQuestion1,
'#required' => TRUE,
);
$form['mo_auth_answer1'] = array(
'#type' => 'textfield',
'#prefix' => $prefixAnswer1,
'#suffix' => $suffixAnswer1,
'#size' => '20',
'#attributes' => array(
'placeholder' => 'Enter your answer',
),
'#required' => TRUE,
);
$form['mo_auth_question2'] = array(
'#type' => 'select',
'#options' => $options_two,
'#prefix' => $prefixQuestion2,
'#suffix' => $suffixQuestion2,
'#required' => TRUE,
);
$form['mo_auth_answer2'] = array(
'#type' => 'textfield',
'#prefix' => $prefixAnswer2,
'#suffix' => $suffixAnswer2,
'#size' => '20',
'#attributes' => array(
'placeholder' => 'Enter your answer',
),
'#required' => TRUE,
);
$form['mo_auth_question3'] = array(
'#type' => 'textfield',
'#prefix' => $prefixQuestion3,
'#suffix' => $suffixQuestion3,
'#attributes' => array(
'placeholder' => 'Enter your custom question here',
),
'#required' => TRUE,
'#size' => 39,
);
$form['mo_auth_answer3'] = array(
'#type' => 'textfield',
'#prefix' => $prefixAnswer3,
'#suffix' => $suffixAnswer3,
'#size' => '20',
'#attributes' => array(
'placeholder' => 'Enter your answer',
),
'#required' => TRUE,
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Register'),
'#submit' => array(
'::handle_page_four_submit',
),
);
return $form;
}