{include file="header.tpl"}

            <!-- PAGE-NAVIGATOR -->
    <section id="page-navigator">
        <div class="container-fluid">
            <div aria-label="breadcrumb">
                <ol class="breadcrumb">
                    <li class="breadcrumb-item"><a href="https://assetsimplewealth.com/user/user/dashboard">Home</a></li>
                    <li class="breadcrumb-item"><a href="javascript:void(0)">2 Step Security</a></li>
                </ol>
            </div>
        </div>
    </section>
    <!-- /PAGE-NAVIGATOR -->
    </header>
    <!-- DASHBOARD-HEADER -->

    <main id="page-container">
 {include file="left.tpl"}
    <section id="dashboard">
        <div class="dashboard-wrapper pb-50">
            <div class="row feature-wrapper top-0">
  
  <div class="col-lg-6 col-md-6 mb-3">
                    <div class="card card-type-1 text-center">
                        <div class="card-header">
                            <h5 class="card-title">Google Authenticator</h5>
                        </div>
                        <div class="card-body">

                            <h6 class="text-uppercase my-3">Use Google Authenticator to Scan the QR code  or use the code</h6>

                            <p class="p-5">Google Authenticator is a multifactor app for mobile devices. It generates timed codes used during the 2-step verification process. To use Google Authenticator, install the Google Authenticator application on your mobile device.</p>
                            <a class="btn btn-success btn-md mt-3"
                               href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en"
                               target="_blank">DOWNLOAD APP</a>

                        </div>

                    </div>
                </div>
 
<!---form method=post>
<input type=hidden name=a value="security">
<input type=hidden name=action value="save">
Detect IP Address Change Sensitivity<br>
<input type=radio name=ip value=disabled {if $security.detect_ip == 'disabled'}checked{/if}>Disabled<br>
<input type=radio name=ip value=medium {if $security.detect_ip == 'medium'}checked{/if}>Medium<br>
<input type=radio name=ip value=high {if $security.detect_ip == 'high'}checked{/if}>High<br>
<input type=radio name=ip value=always {if $security.detect_ip == 'always'}checked{/if}>Paranoic<br><br>

Detect Browser Change<br>
<input type=radio name=browser value=disabled {if $security.detect_browser == 'disabled'}checked{/if}>Disabled<br>
<input type=radio name=browser value=enabled {if $security.detect_browser == 'enabled'}checked{/if}>Enabled<br><br>
<input type=submit value="Set" class=sbmt>
</form-->
  <div class="col-lg-6 col-md-6 mb-3">
                        <div class="card card-type-1 text-center br-4">
                            <div class="card-header">
                                <h5 class="card-title">Two Factor Authenticator</h5>
                            </div>
                            <div class="card-body">
{if $settings.use_tfa}
<form method=post name=mainform>
<input type=hidden name=a value="security">
<input type=hidden name=action value="tfa_save">
<input type=hidden name=time>
{if $errors.invalid_tfa_code}
<b style=color:red>Invalid code.</b><br>
{/if}
{if $errors.invalid_tfa_secret}
<b style=color:red>Invalid Secret.</b><br>
{/if}

{if $tfa_enabled}
<input type="checkbox" name="tfa_on_login" value=1 {if $tfa_settings.login}checked{/if}> on Login<br>
<input type="checkbox" name="tfa_on_edit_account" value=1 {if $tfa_settings.edit_account}checked{/if}> on Edit Account<br>
<input type="checkbox" name="tfa_on_withdraw" value=1 {if $tfa_settings.withdraw}checked{/if}> on Withdraw<br>
{if $settings.internal_transfer_enabled}
<input type="checkbox" name="tfa_on_internal_transfer" value=1 {if $tfa_settings.internal_transfer}checked{/if}> on Internal Transfer<br>
{/if}
<input type="checkbox" name="tfa_disable" value=1> <b style=color:red>Disable Two Factor Authentication (not recommended)</b><br>
<br>
Confirm by typing code: <input type=text name="code" class=inpts> <input type=submit value="Update" class=sbmt>
{else}

                                  

                                <div class="form-group ">
                                    <div class="input-group ">
                                        <input type="text" value="{$tfa_secret}" class="form-control form-control-lg bg-transparent" id="referralURL" readonly>
                                        <div class="input-group-append">
                                                <span class="input-group-text copytext" id="copyBoard"
                                                      onclick="copyFunction()">
                                                    <i class="fa fa-copy"></i>
                                                </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group mx-auto text-center">
                                    <img class="mx-auto" src="{$tfa_secret_url}">
                                </div>

                                <div class="form-group mx-auto text-center">
                         <input type=text name="code" class="form-control form-control-lg bg-transparent"> </div>
                          <div class="form-group mx-auto text-center">
                         <input type=submit value="Enable Two Factor Authenticator" class="btn btn-block btn-lg btn-success">
                                </div>
                         


{/if}
</form> 

   </div>

                        </div>
                    </div>

{literal}
<script language=javascript>
document.mainform.time.value = (new Date()).getTime();

function checkform() {
  if (!document.mainform.code.value.match(/^[0-9]{6}$/)) {
    alert("Please type code!");
    document.mainform.code.focus();
    return false;
  }
  return true;
}
</script>
{/literal}
{/if} {* use_tfa *}


            </div>
        </div>
    </section>

    </main>
</div>
<!-- /DASHBOARD-PAGE-LAYOUT -->
{include file="footer.tpl"}
