Graduate

Update register

......@@ -7,6 +7,18 @@
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Nanum+Gothic:400,700,800&amp;subset=korean">
<style>body,h1,h2,h3,h4,h5 {font-family: "Nanum+Gothic", sans-serif}</style>
<style>
#container {
margin: 0px auto;
border: 10px #333 solid;
}
#videoInput {
background-color: #666;
}
#canvasOutput {
background-color: #666;
}
</style>
<script type='text/javascript' src="{{url_for('static', filename='js/opencv.js')}}"></script>
<script type='text/javascript' src="{{url_for('static', filename='js/utils.js')}}"></script>
<script type='text/javascript' src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
......@@ -142,7 +154,7 @@ function main()
function activate_sender()
{
let sender = document.getElementById("sender");
fileloader.disabled = false;
sender.disabled = false;
}
function toggle_streaming()
......@@ -170,6 +182,16 @@ function submit()
{
let student_id = document.getElementById('student_id').value;
let student_name = document.getElementById('student_name').value;
if (b64encoded === '')
{
alert("얼굴을 먼저 촬영해주세요");
return;
}
if (!(student_id.length && student_name.length))
{
alert("학번과 이름을 입력해주세요");
return;
}
b64encoded = b64encoded.replace('data:image/jpeg;base64,', '')
$.ajax({
type: "POST",
......@@ -208,7 +230,7 @@ and is wrapped around the whole page content, except for the footer in this exam
<div>
학번: <input type="text" id="student_id"><br>
이름: <input type="text" id="student_name"><br><br>
<input id="streamButton" type="button" onclick="toggle_streaming()" value="활영중지" disabled>
<input id="streamButton" type="button" onclick="toggle_streaming()" value="활영중지">
<input id="sender" type="button" onclick="submit()" value="등록" disabled>
</div>
</div>
......