Files
izyim-api/public/index.html
T

87 lines
3.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>AzureUI - SIGNIN</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Nunito:300,400,600,700,900" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="css/global.style.css">
</head>
<body>
<div class="wrapper">
<div class="wrapper-inline">
<div class="form-fixed-large"></div>
<div class="form-row txt-center">
<img src="images/CIEF.png" style="width:200px; height:100px">
</div>
<main>
<section class="container">
<form>
@csrf
<div class="form-row-group with-icons">
<div class="form-row no-padding">
<div style="position:absolute; top: 10px;">
<a class="fa fa-user" style="color: black"></a>
</div>
<input id="phone" type="text" class="form-element" placeholder="Mobile.No" required />
</div>
<div class="form-row no-padding">
<div style="position:absolute; top: 10px;">
<a class="fa fa-lock" style="color: black"></a>
</div>
<input id="password" type="password" class="form-element" placeholder="Password" required />
</div>
</div>
<div class="form-divider"></div>
<div class="form-row txt-center">
<a href="forgot-password.html" data-loader="show">Forgot Password?</a>
</div>
<div class="form-divider"></div>
<div class="form-row">
<a href="#" id="login" class="button block green" type="submit">Sign In</a>
<a href="home.html" class="button block green" id="signin">Sign In</a>
</div>
</form>
<div class="form-row txt-center">
Don't have an account yet? <a href="verify-terms-conditions.html" data-loader="show">Sign-up</a>
</div>
</section>
</main>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#login').click(function() {
$.ajax({
type: "POST",
url: "api/login",
data: {
phone: $('#phone').val(),
password: $('#password').val()
},
success: function(data) {
localStorage.token = data.data.token;
document.location.href="home.html";
alert('Got a token from the server! Token: ' + data.data.token);
},
error: function() {
alert("Login Failed");}
});
})
})
</script>
</body>
</html>