You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

91 lines
3.1 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Login User</title>
<style>
input[type=text], input[type=password], input[type=email] {
width: 100%;
padding:10px;
border: 1px solid #ccc;
border-radius: 4px;
resize: vertical;
}
/* Set a style for the submit button */
.registerbtn {
background-color: #4CAF50;
color: white;
padding: 16px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 8%;
opacity: 0.9;
}
.registerbtn:hover {
opacity: 1;
}
</style>
</head>
<body align="center">
<form action="<?=base_url('login-user')?>" method="POST">
<span><?=(isset($error) && !empty($error))?$error:""?></span>
<input type="hidden" name="<?=$csrfname;?>" value="<?=$csrfhash;?>" />
<br/><br/><br/>
<table align="center">
<tr colspan="2">
<td><input type="email" name="email_address" id="email_address" placeholder="Enter Email" autofocus/></td>
</tr>
</table>
<br/>
<table align="center">
<thead>
<tr colspan="2">
<th><label for="capping"><b></b> </label></th>
</tr>
</thead>
<tbody>
<tr>
<td><label for="premium"><b>Premium </b> </label></td>
<td><input class="isDisabled" type="checkbox" name="premium" id="premium" autofocus disabled/></td>
</tr>
<!-- <tr>
<td><label for="product_code"><b>Subscription Type </b> </label></td>
<td>
<input class="isDisabled" type="radio" name="product_code" value=""/>No Subscription <br/>
<input class="isDisabled" type="radio" name="product_code" value="INT"/>Integral (INT) <br/>
<input class="isDisabled" type="radio" name="product_code" value="ESS"/>Essential (ESS) <br/>
<input class="isDisabled" type="radio" name="product_code" value="FAM"/>Family (FAM) <br/>
<input class="isDisabled" type="radio" name="product_code" value="PRE"/>Former Premium offer (PRE) <br/>
<input class="isDisabled" type="radio" name="product_code" value="MQ"/>Paper + digital offer (MQ) <br/>
</td>
</tr> -->
</tbody>
</table>
<br/>
<input type="submit" value="Login" class="registerbtn"/>
</form>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script>
$(function() {
let MOCK_TEST_EMAILS = Object.freeze(<?=json_encode($whitelisted , TRUE)?>);
$("#email_address").on('keyup', function(){
let input = $(this).val();
if(MOCK_TEST_EMAILS.includes(input)) {
$(".isDisabled").prop('disabled', false)
} else {
$(".isDisabled").prop("checked", false).prop('disabled', true)
}
})
});
</script>
</body>
</html>
<?php
//TODO: Remove this file before updating Prod server!!!
?>