2021-09-09 06:29:31 -07:00
|
|
|
<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">
|
2021-09-24 22:31:36 -07:00
|
|
|
<title>Attendance 點名 - Upload</title>
|
2021-09-09 06:29:31 -07:00
|
|
|
<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">
|
2021-09-18 04:26:06 -07:00
|
|
|
<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>
|
2021-09-09 06:29:31 -07:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
2021-09-26 06:37:34 -07:00
|
|
|
<div class="showTime"><span id="showTime"></span></div>
|
2021-09-09 06:29:31 -07:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
2021-09-18 04:26:06 -07:00
|
|
|
<div class="col"></div>
|
|
|
|
<div class="col-md-5">
|
|
|
|
<h1 class="text-center margin-top">Upload {{title}}</h1>
|
2021-09-09 06:29:31 -07:00
|
|
|
<!-- upload csv -->
|
2021-09-14 07:55:11 -07:00
|
|
|
<form action="{{url}}" id="uploadCsvForm" method="post" enctype="multipart/form-data">
|
2021-09-09 06:29:31 -07:00
|
|
|
<!-- input class code -->
|
2021-09-18 04:26:06 -07:00
|
|
|
<div class="form-group margin-top row">
|
|
|
|
<div class="col-3 center"><label for="gradeCode">Grade Code</label></div>
|
|
|
|
<div class="col center-input"> <input type="text" class="form-control" id="gradeCode"
|
|
|
|
name="gradeCode" placeholder="Enter Grade Code"></div>
|
2021-09-10 07:30:39 -07:00
|
|
|
</div>
|
2021-09-18 04:26:06 -07:00
|
|
|
<div class="form-group margin-top row">
|
|
|
|
<div class="col-3 center"><label for="classcode">Class Code</label></div>
|
|
|
|
<div class="col-9 center-input"><input type="text" class="form-control" id="classcode"
|
|
|
|
name="classcode" placeholder="Enter Class Code"></div>
|
2021-09-09 06:29:31 -07:00
|
|
|
</div>
|
2021-09-18 04:26:06 -07:00
|
|
|
<div class="form-group margin-top row">
|
|
|
|
<div class="col-3 center"><label for="csv">{{title}}</label></div>
|
|
|
|
<div class="col-9 center-input"><input type="file" class="form-control-file" id="csv"
|
|
|
|
name="csv"></div>
|
2021-09-09 06:29:31 -07:00
|
|
|
</div>
|
2021-09-14 07:55:11 -07:00
|
|
|
<button onclick="loadingAnimation()" type="button" class="btn btn-primary">Upload</button>
|
2021-09-09 06:29:31 -07:00
|
|
|
</form>
|
2021-09-12 02:39:09 -07:00
|
|
|
<!-- show danger zone -->
|
|
|
|
<div class="alert alert-danger" role="alert">
|
|
|
|
<h4 class="alert-heading">Warning! 警告!</h4>
|
|
|
|
<p>If you are not the adminstrator, please do not click "upload" This might make the system
|
|
|
|
unuseable.</p>
|
|
|
|
<p>非管理員請勿點選! 可能會讓系統無法使用!</p>
|
|
|
|
</div>
|
2021-09-09 06:29:31 -07:00
|
|
|
</div>
|
2021-09-18 04:26:06 -07:00
|
|
|
<div class="col"></div>
|
2021-09-09 06:29:31 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-09-12 02:39:09 -07:00
|
|
|
<div id="loading" style="text-align:center; width:100%; display:none;"><img src="/static/loading.gif" alt=""
|
|
|
|
style="height:100%;" />
|
|
|
|
</div>
|
2021-09-24 22:31:36 -07:00
|
|
|
{% include 'footer.html' %}
|
2021-09-12 02:44:27 -07:00
|
|
|
<script type="text/javascript" src="/static/jquery.min.js"></script>
|
2021-09-12 02:39:09 -07:00
|
|
|
<script>
|
|
|
|
function loadingAnimation() {
|
2021-09-14 07:55:11 -07:00
|
|
|
// if csv is empty
|
|
|
|
if ($("#csv").val() == "") {
|
|
|
|
alert("Please select a file!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$('#uploadCsvForm').submit();
|
2021-09-12 02:39:09 -07:00
|
|
|
$('.container').hide();
|
|
|
|
$('#loading').show();
|
|
|
|
}
|
|
|
|
</script>
|
2021-09-18 07:04:31 -07:00
|
|
|
<script src="/static/time.js"></script>
|
2021-09-09 06:29:31 -07:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|