function mo2f_configure_for_mobile_suppport_kba($current_user)
{
    ?>
		
			<h3>Configure Second Factor - KBA (Security Questions)</h3><hr />
			<?php 
    mo2f_configure_kba_questions();
    ?>
	<br />
				<input type="hidden" name="option" value="mo2f_save_kba" />
				</form>
			<table>
			<tr>
			
				<td>
				<form name="f" method="post" action="" id="mo2f_cancel_form">
					<input type="hidden" name="option" value="mo2f_cancel_configuration" />
					<input type="submit" name="back" id="back_btn" class="button button-primary button-large" value="Back" style="width:100px;line-height:30px;" />
				</form>
				</td>
				<td></td>
				<td>
				<input type="button" id="mo2f_kba_submit_btn" name="submit" value="Save" class="button button-primary button-large" style="width:100px;line-height:30px;"/>
					
				</td>
				
				
			</tr>
			</table>
		<script>
		
			jQuery('#mo2f_kba_submit_btn').click(function() {
				jQuery('#mo2f_kba_setup_form').submit();
			});
		</script>
	<?php 
}
function prompt_user_for_kba_setup_frontend($current_user)
{
    $opt = (array) get_option('mo2f_auth_methods_for_users');
    ?>
	<div class="modal" tabindex="-1" role="dialog" id="myModal11">
	 <div class="mo2f-modal-backdrop"></div>
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
			<div class="modal-header">
				<h3 class="modal-title"><button type="button" class="close" data-dismiss="modal" aria-label="Close" title="Back to login" onclick="mologinback();"><span aria-hidden="true">&times;</span></button>
						Setup Security Questions (KBA)</h3>
			</div>
	<div class="modal-body">
	<p><?php 
    echo $_SESSION['mo2f-login-message'];
    ?>
</p>
		<div class="mo_margin_left">
		<?php 
    mo2f_configure_kba_questions();
    ?>
		<br />
		<?php 
    if (sizeof($opt) > 1) {
        ?>
					<input type="button" name="back" id="mo2f_inline_back_btn" class="miniorange-button" value="Back" />
		<?php 
    }
    ?>
		<input type="button" name="validate" onclick="moinlinesavekba();" class="miniorange-button" value="Save" />
		</div>
		
		<?php 
    if (get_option('mo2f_disable_poweredby') != 1) {
        ?>
				<div class="mo2f_powered_by_div"><a target="_blank" href="http://miniorange.com/2-factor-authentication"><div class="mo2f_powered_by_miniorange" style="background-image: url('<?php 
        if (get_option('mo2f_enable_custom_poweredby') == 1) {
            echo site_url() . '/wp-content/uploads/custom.png';
        } else {
            echo plugins_url('/includes/images/miniOrange2.png', __FILE__);
        }
        ?>
');"></div></a></div>
				<?php 
    }
    ?>
	</div>
		 </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<style>
.woocommerce .woocommerce-error {
  display: none !important;
}
</style>
		<script>
			jQuery('.woocommerce-error').hide();
			jQuery('#myModal11').modal('show');
			
			function mologinback(){
				jQuery('#mo2f_backto_mo_loginform').submit();
			}
			
			function moinlinesavekba(){
				var kba_1 = jQuery('#mo2f_kbaquestion_1').val();
				var kba_2 = jQuery('#mo2f_kba_ans1').val();
				var kba_3 = jQuery('#mo2f_kbaquestion_2').val();
				var kba_4 = jQuery('#mo2f_kba_ans2').val();
				var kba_5 = jQuery('#mo2f_kbaquestion_3').val();
				var kba_6 = jQuery('#mo2f_kba_ans3').val();
				//alert("1: " + kba_1 + " 2: " + kba_2 + " 3: " + kba_3 + " 4: " + kba_4 + " 5: " + kba_5 + " 6: " + kba_6);
				document.getElementById("mo2f_inline_save_kba_form").elements[0].value = kba_1;
				document.getElementById("mo2f_inline_save_kba_form").elements[1].value = kba_2;
				document.getElementById("mo2f_inline_save_kba_form").elements[2].value = kba_3;
				document.getElementById("mo2f_inline_save_kba_form").elements[3].value = kba_4;
				document.getElementById("mo2f_inline_save_kba_form").elements[4].value = kba_5;
				document.getElementById("mo2f_inline_save_kba_form").elements[5].value = kba_6;
				jQuery('#mo2f_inline_save_kba_form').submit();
			 }
			 jQuery('#mo2f_inline_back_btn').click(function() {	
					jQuery('#mo2f_goto_two_factor_form').submit();
			});
			function mologinback(){
				jQuery('#mo2f_backto_mo_loginform').submit();
			}
		</script>
		
	<?php 
}
function prompt_user_for_kba_setup($current_user)
{
    $opt = (array) get_option('mo2f_auth_methods_for_users');
    ?>
		<div class="miniorange_app_setup_page">
		
		<div class="miniorange-app-setup-container">
		<h2 class="mo_header_background">Setup Security Question (KBA)</h2>
		<div class="mo_margin_left">
		<br>
		<p><b><?php 
    echo $_SESSION['mo2f-login-message'];
    ?>
</b></p>
		<br>
		<?php 
    mo2f_configure_kba_questions();
    ?>
		<br />
		<?php 
    if (sizeof($opt) > 1) {
        ?>
					<input type="button" name="back" id="mo2f_inline_back_btn" class="miniorange-button" value="Back" />
		<?php 
    }
    ?>
		<input type="button" name="validate" onclick="moinlinesavekba();" class="miniorange-button" value="Save" />
		<br>
		<?php 
    if (sizeof($opt) == 1) {
        ?>
		<input type="button" name="miniorange_login_back" onclick="mologinback();" id="miniorange_login_back" class="button-green" value="←Back To Login" />
		<?php 
    }
    ?>
		</div>
		
		<div class="mo2f_powered_by_div"><a target="_blank" href="http://miniorange.com/2-factor-authentication"><div class="mo2f_powered_by_miniorange"></div></a></div>
			</div>
		</div>
		<script>
			jQuery("div#login").hide();
			jQuery("body.login div#login").before(jQuery('.miniorange_app_setup_page'));
			function moinlinesavekba(){
				var kba_1 = jQuery('#mo2f_kbaquestion_1').val();
				var kba_2 = jQuery('#mo2f_kba_ans1').val();
				var kba_3 = jQuery('#mo2f_kbaquestion_2').val();
				var kba_4 = jQuery('#mo2f_kba_ans2').val();
				var kba_5 = jQuery('#mo2f_kbaquestion_3').val();
				var kba_6 = jQuery('#mo2f_kba_ans3').val();
				//alert("1: " + kba_1 + " 2: " + kba_2 + " 3: " + kba_3 + " 4: " + kba_4 + " 5: " + kba_5 + " 6: " + kba_6);
				document.getElementById("mo2f_inline_save_kba_form").elements[0].value = kba_1;
				document.getElementById("mo2f_inline_save_kba_form").elements[1].value = kba_2;
				document.getElementById("mo2f_inline_save_kba_form").elements[2].value = kba_3;
				document.getElementById("mo2f_inline_save_kba_form").elements[3].value = kba_4;
				document.getElementById("mo2f_inline_save_kba_form").elements[4].value = kba_5;
				document.getElementById("mo2f_inline_save_kba_form").elements[5].value = kba_6;
				jQuery('#mo2f_inline_save_kba_form').submit();
			 }
			 jQuery('#mo2f_inline_back_btn').click(function() {	
					jQuery('#mo2f_goto_two_factor_form').submit();
			});
			function mologinback(){
				jQuery('#mo2f_backto_mo_loginform').submit();
			}
		</script>
		
	<?php 
}