otp check
Showing
otp.py
0 → 100644
simple_sql.pyc
deleted
100644 → 0
File deleted
templates/otp.html
0 → 100644
{% extends "bootstrap/base.html" %} | ||
{% block head %} | ||
{{super()}} | ||
<!-- bootstrap --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" | ||
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> | ||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" | ||
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" | ||
crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" | ||
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" | ||
crossorigin="anonymous"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" | ||
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" | ||
crossorigin="anonymous"></script> | ||
<!-- keyboard css--> | ||
<link rel="stylesheet" href="{{url_for('static',filename='css/keyboard.css')}}"> | ||
<link rel="stylesheet" href="{{url_for('static',filename='css/main.css')}}"> | ||
<script> | ||
$(document).ready(function () { | ||
document.getElementById("keyboard").style.visibility = 'visible'; | ||
}); | ||
</script> | ||
{% endblock head %} | ||
{% block content%} | ||
<body class="container mx-auto bg-light m-2"> | ||
<h2 class="text-muted text-center m-5">{{data}} Input</h2> | ||
<center> | ||
<div class="row col mx-auto m-2 col-8"> | ||
<div class="col-sm"> | ||
{% for i in range(6) %} | ||
<input type="password" class="form-control input float-left col-sm-2 text-center input_margin btn-font" id="slot-{{loop.index}}" disabled="true" maxlength="1"> | ||
{% endfor %} | ||
</div> | ||
<div class="col-2 inline"> | ||
<button type="submit" class="btn btn-primary btn-font" id="setup" >Confirm</button> | ||
</div> | ||
</div> | ||
<div class="row align-items-center"> | ||
<div class="col m-2 inline"> | ||
<div class="simple-keyboard" id="keyboard" style="visibility: hidden"></div> | ||
</div> | ||
</div> | ||
</center> | ||
<script src="{{url_for('static', filename='js/keyboard.min.js')}}"></script> | ||
<script src="{{url_for('static', filename='js/pincode.js')}}"></script> | ||
<script> | ||
$('#setup') .click(function(){ | ||
if( pin_code.length == 6 ){ | ||
console.log(pin_code); | ||
pin = pin_code.join(''); | ||
data="type={{data}}&pin="+pin | ||
$.ajax({ | ||
type:"POST", | ||
url:"http://localhost:8080/otp_check", | ||
data:data, | ||
success:function(data, status){ | ||
alert("PIN CODE SETUP SUCCESS"); | ||
window.location.href="http://localhost:8080/main_page"; | ||
}, | ||
error:function(data, status){ | ||
alert("PIN CODE SETUP FAILED") | ||
} | ||
}); | ||
}else{ | ||
alert('PINCODE LENGTH MUST BE 6'); | ||
} | ||
}) | ||
</script> | ||
<!-- keyboard js--> | ||
</body> | ||
{% block footer %} | ||
<footer class="footer" > | ||
<div class="footer navbar-fixed-bottom text-center"> | ||
<p class="text-muted">© NTUST PRLAB</p> | ||
</div> | ||
</footer> | ||
{% endblock footer %} | ||
{% endblock %} | ||
test.py
0 → 100644
wifi_utils.pyc
deleted
100644 → 0
File deleted
Please register or sign in to comment