mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
Update ESX Identity
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="dialog">
|
||||
<form id="register">
|
||||
<h1>Register</h1>
|
||||
<input id="firstname" type="text" placeholder="Křestní jméno"><br>
|
||||
<input id="lastname" type="text" placeholder="Příjmení"><br>
|
||||
<input id="dateofbirth" type="text" placeholder="Datum narození (YYYY-MM-DD)"><br>
|
||||
<input id="height" type="text" placeholder="Výška (140-200 cm)"><br><center>
|
||||
<input type="radio" name="sex" value="m" checked>Male
|
||||
<input type="radio" name="sex" value="ž">Female<br></center>
|
||||
<button id="submit" type="submit">Vytvořit</button>
|
||||
</form>
|
||||
</div>
|
||||
<script src="script.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="dialog">
|
||||
<form id="register">
|
||||
<h1>Rekistöröinti</h1>
|
||||
<input id="firstname" type="text" placeholder="Etunimi"><br>
|
||||
<input id="lastname" type="text" placeholder="Sukunimi"><br>
|
||||
<input id="dateofbirth" type="text" placeholder="Syntymäaika (PP.KK.VVVV)"><br>
|
||||
<input id="height" type="text" placeholder="Pituus (140-200 cm)"><br><center>
|
||||
<input type="radio" name="sex" value="m" checked>Mies
|
||||
<input type="radio" name="sex" value="f">Nainen<br></center>
|
||||
<button id="submit" type="submit">Luo</button>
|
||||
</form>
|
||||
</div>
|
||||
<script src="script.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="dialog">
|
||||
<form id="register">
|
||||
<h1>Register</h1>
|
||||
<input id="firstname" type="text" placeholder="First name"><br>
|
||||
<input id="lastname" type="text" placeholder="Last name"><br>
|
||||
<input id="dateofbirth" type="text" placeholder="Date of Birth (YYYY-MM-DD)"><br>
|
||||
<input id="height" type="text" placeholder="Height (140-200 cm)"><br><center>
|
||||
<input type="radio" name="sex" value="m" checked>Male
|
||||
<input type="radio" name="sex" value="f">Female<br></center>
|
||||
<button id="submit" type="submit">Create</button>
|
||||
</form>
|
||||
</div>
|
||||
<script src="script.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="dialog">
|
||||
<form id="register">
|
||||
<h1>등록</h1>
|
||||
<input id="firstname" type="text" placeholder="이름"><br>
|
||||
<input id="lastname" type="text" placeholder="성"><br>
|
||||
<input id="dateofbirth" type="text" placeholder="생일 (YYYY-MM-DD)"><br>
|
||||
<input id="height" type="text" placeholder="키 (140-200 cm)"><br><center>
|
||||
<input type="radio" name="sex" value="m" checked>남자
|
||||
<input type="radio" name="sex" value="f">여자<br></center>
|
||||
<button id="submit" type="submit">생성</button>
|
||||
</form>
|
||||
</div>
|
||||
<script src="script.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,33 +0,0 @@
|
||||
$(function() {
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data.type == "enableui") {
|
||||
document.body.style.display = event.data.enable ? "block" : "none";
|
||||
}
|
||||
});
|
||||
|
||||
document.onkeyup = function (data) {
|
||||
if (data.which == 27) { // Escape key
|
||||
$.post('http://esx_identity/escape', JSON.stringify({}));
|
||||
}
|
||||
};
|
||||
|
||||
$("#register").submit(function(event) {
|
||||
event.preventDefault(); // Prevent form from submitting
|
||||
|
||||
// Verify date
|
||||
var date = $("#dateofbirth").val();
|
||||
var dateCheck = new Date($("#dateofbirth").val());
|
||||
|
||||
if (dateCheck == "Invalid Date") {
|
||||
date == "invalid";
|
||||
}
|
||||
|
||||
$.post('http://esx_identity/register', JSON.stringify({
|
||||
firstname: $("#firstname").val(),
|
||||
lastname: $("#lastname").val(),
|
||||
dateofbirth: date,
|
||||
sex: $("input[type='radio'][name='sex']:checked").val(),
|
||||
height: $("#height").val()
|
||||
}));
|
||||
});
|
||||
});
|
||||
@@ -1,46 +0,0 @@
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
width: 300px;
|
||||
position: absolute;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 10px;
|
||||
box-shadow: 0px 0px 50px 0px #000;
|
||||
background-color: #f1f1f1;
|
||||
overflow: hidden;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
width: 100%;
|
||||
padding: 7px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
button {
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
padding: 10px;
|
||||
background-color: #506be6;
|
||||
border: 0;
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
padding: 10px;
|
||||
background-color: #506be6;
|
||||
color: #fff;
|
||||
width: 93%;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
||||
<link href="style.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="dialog">
|
||||
<form id="register">
|
||||
<h1>Registrera</h1>
|
||||
<input id="firstname" type="text" placeholder="Förnamn"><br>
|
||||
<input id="lastname" type="text" placeholder="Efternamn"><br>
|
||||
<input id="dateofbirth" type="text" placeholder="Födelsedatum (YYYY-MM-DD)"><br>
|
||||
<input id="height" type="text" placeholder="Längd (140-200 cm)"><br><center>
|
||||
<input type="radio" name="sex" value="m" checked>Man
|
||||
<input type="radio" name="sex" value="f">Kvinna<br></center>
|
||||
<button id="submit" type="submit">Skapa</button>
|
||||
</form>
|
||||
</div>
|
||||
<script src="script.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user