mirror of
https://github.com/aaronleetw/Attendance.git
synced 2024-11-14 19:11:39 -08:00
104 lines
5.2 KiB
HTML
104 lines
5.2 KiB
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">
|
||
|
<title>Attendance 點名系統 (β)</title>
|
||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
|
||
|
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
||
|
<link rel="stylesheet" href="/static/allpages.css">
|
||
|
<link rel="stylesheet" href="/static/login.css">
|
||
|
<link rel="shortcut icon" type="image/x-icon" href="/static/favicon.ico" />
|
||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H6D61RSBHR"></script>
|
||
|
<script>
|
||
|
window.dataLayer = window.dataLayer || [];
|
||
|
function gtag() { dataLayer.push(arguments); }
|
||
|
gtag('js', new Date());
|
||
|
|
||
|
gtag('config', 'G-H6D61RSBHR');
|
||
|
</script>
|
||
|
<style>
|
||
|
.form-group {
|
||
|
margin-bottom: 30px !important;
|
||
|
}
|
||
|
</style>
|
||
|
<!-- <script src="https://www.google.com/recaptcha/api.js"></script> -->
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div class="showTime"><span id="showTime"></span></div>
|
||
|
<div class="container">
|
||
|
<h1 class="margin-top margin-bottom">Attendance 點名系統 (β) | Change Password 更改密碼</h1>
|
||
|
<div class="row">
|
||
|
<div class="col"></div>
|
||
|
<div class="col-md-5">
|
||
|
<form action="/chgPassword" id="loginForm" method="post">
|
||
|
<div class="form-group row" style="margin-bottom: 10px;">
|
||
|
<div class="col-3 center"><label for="password" style="font-size: 19px">Old Password 舊密碼:
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="col-9 center-input"><input type="password" class="form-control" name="password"
|
||
|
id="password" required></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group row" style="margin-bottom: 10px;">
|
||
|
<div class="col-3 center"><label for="password" style="font-size: 19px">New Username 新帳號:
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="col-9 center-input"><input type="email" class="form-control" name="new_username"
|
||
|
id="new_username" required></div>
|
||
|
</div>
|
||
|
<div class="form-group row" style="margin-bottom: 10px;">
|
||
|
<div class="col-3 center"><label for="password" style="font-size: 19px">New Password 新密碼:
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="col-9 center-input"><input type="password" class="form-control" name="new_password"
|
||
|
id="new_password" required></div>
|
||
|
</div>
|
||
|
<button class="btn btn-danger btn-block g-recaptcha" onclick="loadingAnimation()">Change Password
|
||
|
更改密碼</button>
|
||
|
<a href="/"><button type="button" class="btn btn-primary btn-block g-recaptcha"
|
||
|
onclick="loadingAnimation()">Go back 回上一頁</button></a>
|
||
|
</form>
|
||
|
<div class="disclaimer" hidden="hidden">
|
||
|
This site is protected by reCAPTCHA and the Google
|
||
|
<a target="_blank" href="https://policies.google.com/privacy">Privacy Policy</a> and
|
||
|
<a target="_blank" href="https://policies.google.com/terms">Terms of Service</a> apply.
|
||
|
</div>
|
||
|
{% with messages = get_flashed_messages() %}
|
||
|
{% if messages %}
|
||
|
<div class="alert alert-danger" role="alert">
|
||
|
{% for message in messages %}
|
||
|
{% autoescape false %}{{message}}{% endautoescape %}
|
||
|
{% endfor %}
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
{% endwith %}
|
||
|
</div>
|
||
|
<div class="col"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="loading" style="text-align:center; width:100%; display:none;"><img src="/static/loading.gif" alt=""
|
||
|
style="height:100%;" />
|
||
|
</div>
|
||
|
{% include 'footer.html' %}
|
||
|
<script type=" text/javascript" src="/static/jquery.min.js"></script>
|
||
|
<script>
|
||
|
function validateEmail(email) {
|
||
|
const emailRegEx = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||
|
function loadingAnimation() {
|
||
|
$('#loginForm').submit();
|
||
|
if ($("#username").val() == "" || $("#password").val() == "" || $("#new_username").val() == "" || $("#new_password").val() == "" ||
|
||
|
!emailRegEx.test($("#username").val().toLowerCase()) || !emailRegEx.test($("#new_username").val().toLowerCase())) {
|
||
|
return;
|
||
|
}
|
||
|
$('.container').hide();
|
||
|
$('#loading').show();
|
||
|
}
|
||
|
</script>
|
||
|
<script src="/static/time.js"></script>
|
||
|
</body>
|
||
|
|
||
|
</html>
|