ldap-python-webui/_2fa.tpl

60 lines
1.9 KiB
Smarty
Raw Normal View History

2023-11-10 13:12:15 +01:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex, nofollow">
<title>{{ str['welcome'] }}</title>
<link rel="stylesheet" href="{{ url('static', filename='style.css') }}">
</head>
<body>
<main>
2023-11-24 20:06:38 +01:00
<h1>{{ str['2fa-title'] }}</h1>
2023-11-10 13:12:15 +01:00
2023-11-16 05:35:57 +01:00
% if data['secureAuth'] == True:
2023-11-24 20:25:35 +01:00
<div class="info">{{ str['2fa-info-1'] }}</div>
2023-11-18 20:44:06 +01:00
<div class="qr-code">
2023-11-25 15:58:37 +01:00
<img src="{{'static/tmp/'+data['authCode']+'.png'}}" />
2023-11-18 20:44:06 +01:00
</div>
2023-11-17 13:17:16 +01:00
<form name="disable2faForm" method="post" action="/disable_2fa">
2023-11-24 20:06:38 +01:00
2023-11-25 15:58:37 +01:00
<label for="code">{{ str['code'] }}</label>
<input id="" name="code" type="text" value="{{data['authCode']}}" readonly>
2023-11-10 13:12:15 +01:00
2023-11-16 05:35:57 +01:00
<div class="form-buttons">
<a href="/user"><button class="green" type="button">{{ str['back'] }}</button></a>
2023-11-24 20:06:38 +01:00
<button class="green" type="submit">{{ str['disable'] }}</button>
2023-11-16 05:35:57 +01:00
</div>
2023-11-10 13:12:15 +01:00
2023-11-16 05:35:57 +01:00
</form>
% else:
2023-11-24 20:25:35 +01:00
<div class="info">{{ str['2fa-info-2'] }}</div>
2023-11-16 13:17:59 +01:00
<form name="enable2faForm" method="post" action="/enable_2fa">
2023-11-16 05:35:57 +01:00
2023-11-25 15:58:37 +01:00
<!--<input id="token" name="token" type="text" value="{{data['authCode']}}" readonly>-->
2023-11-16 05:35:57 +01:00
<div class="form-buttons">
<a href="/user"><button class="green" type="button">{{ str['back'] }}</button></a>
2023-11-24 20:06:38 +01:00
<button class="green" type="submit">{{ str['enable'] }}</button>
2023-11-16 05:35:57 +01:00
</div>
</form>
%end
2023-11-10 13:12:15 +01:00
%for type, text, animation in get('alerts', []):
<div class="alerts {{ animation }}">
<div class="alert {{ type }}">{{ text }}</div>
</div>
%end
</main>
</body>
</html>