-
Notifications
You must be signed in to change notification settings - Fork 281
/
two-factor-challenge.tpl
59 lines (52 loc) · 2.29 KB
/
two-factor-challenge.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<div class="logincontainer">
{include file="$template/includes/pageheader.tpl" title=$LANG.twofactorauth}
{include file="$template/includes/flashmessage.tpl" align="center"}
{if $newbackupcode}
{include file="$template/includes/alert.tpl" type="success" msg=$LANG.twofabackupcodereset textcenter=true}
{elseif $incorrect}
{include file="$template/includes/alert.tpl" type="error" msg=$LANG.twofa2ndfactorincorrect textcenter=true}
{elseif $error}
{include file="$template/includes/alert.tpl" type="error" msg=$error textcenter=true}
{else}
{include file="$template/includes/alert.tpl" type="warning" msg=$LANG.twofa2ndfactorreq textcenter=true}
{/if}
<form method="post" action="{routePath('login-two-factor-challenge-verify')}" id="frmTwoFactorChallenge"{if $usingBackup} class="hidden"{/if}>
<div class="margin-bottom">
{$challenge}
</div>
<p class="text-center">
{$LANG.twofacantaccess2ndfactor}
<a href="#" id="loginWithBackupCode">
{$LANG.twofaloginusingbackupcode}
</a>
</p>
</form>
<form method="post" action="{routePath('login-two-factor-challenge-backup-verify')}" id="frmTwoFactorBackup"{if !$usingBackup} class="hidden"{/if}>
<div class="margin-bottom">
<input type="text" name="twofabackupcode" class="form-control input-lg" placeholder="{$LANG.twofabackupcodelogin}">
<br/>
<button type="submit" class="btn btn-primary btn-lg btn-block" id="btnLogin">
{$LANG.loginbutton}
</button>
</div>
<p class="text-center">
<a href="#" id="backupCodeCancel">
{lang key='cancel'}
</a>
</p>
</form>
</div>
<script>
jQuery(document).ready(function() {
jQuery('#loginWithBackupCode').click(function(e) {
e.preventDefault();
jQuery('#frmTwoFactorChallenge').hide();
jQuery('#frmTwoFactorBackup').removeClass('hidden').show();
});
jQuery('#backupCodeCancel').click(function(e) {
e.preventDefault();
jQuery('#frmTwoFactorChallenge').removeClass('hidden').show();
jQuery('#frmTwoFactorBackup').hide();
});
});
</script>