blob: 6c1f7c7fea051011ff535ac096e8bb827e836b6e [file] [log] [blame]
<html>
<head>
<meta charset="UTF-8">
<title>Pàgina de benvinguda</title>
<link rel="stylesheet" href="./css/basic.css" />
<link rel="stylesheet" href="./css/login.css" />
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</head>
<body>
<div id="outter-container">
<div id="inner-container">
<h1>Selecciona el teu nom</h1>
<h3>Per entrar al joc de la Pastanaga Assessina</h3>
<form action="./php/login.php" method="POST">
<select name="user" id="list">
</select>
<input disabled required placeholder="Clau d'accés..." id="password" type="password" name="password"/>
<input type="submit" value="Entrar" />
</form>
</div>
</div>
<script>
$.post("./ajax/getusers.php", function(data, status){
$("#list").html(data);
});
$('select').on('change', function() {
let nopassword = $('select option:selected').hasClass('nopassword');
$('#password').prop('disabled', nopassword);
});
</script>
</body>
</html>