mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
Add files via upload
This commit is contained in:
@@ -32,6 +32,7 @@ if not Config.UseDeferrals then
|
||||
type = "enableui",
|
||||
enable = state
|
||||
})
|
||||
if state == false then ClearTimecycleModifier() end
|
||||
end
|
||||
|
||||
RegisterNetEvent('esx_identity:showRegisterIdentity')
|
||||
@@ -40,9 +41,12 @@ if not Config.UseDeferrals then
|
||||
|
||||
if not ESX.GetPlayerData().dead then
|
||||
EnableGui(true)
|
||||
SetTimecycleModifier("hud_def_blur")
|
||||
SetTimecycleModifierStrength(1)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNUICallback('register', function(data, cb)
|
||||
ESX.TriggerServerCallback('esx_identity:registerIdentity', function(callback)
|
||||
if callback then
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
|
||||
|
||||
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
overflow: hidden;
|
||||
display: none;
|
||||
color: #000000;
|
||||
background: linear-gradient(135deg, rgba(33, 47, 63, 0.9) 51%, hsla(214, 33%, 22%, 0.8) 100%);
|
||||
}
|
||||
|
||||
.dialog {
|
||||
@@ -12,28 +15,41 @@ body {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
top : 30.0%;
|
||||
padding: 10px;
|
||||
padding: 20px;
|
||||
left : 50%; /* à 50%/50% du parent référent */
|
||||
transform : translate(-50%); /* décalage de 50% de sa propre taille */
|
||||
background-color: #B7B7B7;
|
||||
border-radius : 4px;
|
||||
box-shadow: 0px 0px 50px 0px #000;
|
||||
border-left:5px solid #000;
|
||||
border:1px inset;
|
||||
background-color: #152029;
|
||||
border-radius : 10px;
|
||||
box-shadow: 0 -5px 3px -3px #21303d, 0 5px 3px -3px #21303d;
|
||||
border:none;
|
||||
margin:5px;
|
||||
margin-bottom:20px;
|
||||
color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.aa {
|
||||
font-family: "Gill Sans", sans-serif;
|
||||
font-size: 22px;
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
input {
|
||||
margin-bottom: 15px;
|
||||
border: none;
|
||||
border-bottom: 2px solid #58636c;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
padding: 10px;
|
||||
padding-left:0;
|
||||
color: #ffffff;
|
||||
text-align:left;
|
||||
color: #000000;
|
||||
background-color: #152029;
|
||||
}
|
||||
|
||||
::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
|
||||
color: black;
|
||||
color: rgba(84,97,105,255);
|
||||
opacity: 1; /* Firefox */
|
||||
}
|
||||
|
||||
@@ -46,42 +62,48 @@ input {
|
||||
.radio-toolbar label {
|
||||
display: inline-block;
|
||||
margin-top: 5px;
|
||||
background-color: #ddd;
|
||||
background-color: rgba(15,15,15,0.9);
|
||||
padding: 10px 20px;
|
||||
font-family: sans-serif, Arial;
|
||||
font-size: 16px;
|
||||
color: #000000;
|
||||
border: 2px solid #444;
|
||||
border-radius: 4px;
|
||||
color: #FFFFFF;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
width: 36%;
|
||||
}
|
||||
|
||||
.radio-toolbar input[type="radio"]:checked + label {
|
||||
width: 36%;
|
||||
background-color:#3399FF;
|
||||
border-color: #0033FF;
|
||||
color: #000000;
|
||||
background-color:rgba(15,15,15,0.9);
|
||||
border: none;
|
||||
border-bottom: 1px solid #93a3b6;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.radio-toolbar input[type="radio"]:focus + label {
|
||||
border: 2px solid #444;
|
||||
width: 36%;
|
||||
color: #000000;
|
||||
background-color:rgba(15,15,15,0.9);
|
||||
border: none;
|
||||
border-bottom: 1px solid #93a3b6;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.radio-toolbar label:hover {
|
||||
background-color: #dfd;
|
||||
background-color: rgba(28, 24, 24, 0.931);
|
||||
width: 36%;
|
||||
color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
button {
|
||||
display: block;
|
||||
margin-top: 5px;
|
||||
padding: 10px;
|
||||
background-color: #373737;
|
||||
border: 2px solid #444;
|
||||
margin-top: 35px;
|
||||
/*padding: 10px;*/
|
||||
background-color: #4569c6;
|
||||
outline: none;
|
||||
border: 2px double rgba(40, 40, 40, 0.9);
|
||||
color: #FFFFFF;
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -90,8 +112,8 @@ h1 {
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
padding: 10px;
|
||||
background-color: #506be6;
|
||||
color: #000000;
|
||||
background-color: rgba(15,15,15,0.9);
|
||||
color: #ffffff;
|
||||
width: 93%;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -106,8 +128,8 @@ h1 {
|
||||
}
|
||||
|
||||
.bubble {
|
||||
background: #3399FF;
|
||||
color: black;
|
||||
background: rgba(15,15,15,0.9);
|
||||
color: #ffffff;
|
||||
padding: 4px 12px;
|
||||
position: absolute;
|
||||
border-radius: 4px;
|
||||
@@ -115,12 +137,13 @@ h1 {
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
|
||||
.bubble::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 2px;
|
||||
height: 2px;
|
||||
background: #3399FF;
|
||||
background: rgba(15,15,15,0.9);
|
||||
color: black;
|
||||
top: -1px;
|
||||
left: 50%;
|
||||
|
||||
@@ -8,11 +8,17 @@
|
||||
|
||||
<body onkeydown="TriggeredKey(this)">
|
||||
<div class="dialog">
|
||||
<img id="logo" src="img/esx_identity.png" height="110px" width="332px">
|
||||
<div class="aa"><b>IDENTITY</b></div>
|
||||
<!-- <img id="logo" height="110px" width="332px"> > -->
|
||||
<form id="register" name="register" action="#">
|
||||
<input id="firstname" type="text" class="" name="firstname" placeholder="First Name (Max 16 Characters)" onKeyDown="if(this.value.length==16 && event.keyCode!=8) return false;" onkeypress="if (isNumber(event) == true) return false;" onKeyUp="checkFirstName()" onmouseup="checkFirstName()"><br>
|
||||
<input id="lastname" type="text" class="" name="lastname" placeholder="Last Name (Max 16 Characters)" onKeyDown="if(this.value.length==16 && event.keyCode!=8) return false;" onkeypress="if (isNumber(event) == true) return false;" onKeyUp="checkLastName()" onmouseup="checkLastName()"><br>
|
||||
<input id="dateofbirth" type="text" name="dateofbirth" class="" placeholder="Date of Birth (MM/DD/YYYY)" dateformat="M d y" min="01/01/1900" max="12/31/2020" onfocus="(this.type='date')" onkeypress="if ( isNaN(String.fromCharCode(event.keyCode) )) return false;" onchange="checkDOB()" onKeyUp="checkDOB()" onmouseup="checkDOB()"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif";>First Name</div>
|
||||
<input id="firstname" type="text" class="" name="firstname" placeholder="First Name" onKeyDown="if(this.value.length==16 && event.keyCode!=8)"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif";>Last Name</div>
|
||||
<input id="lastname" type="text" class="" name="lastname" placeholder="Last Name" onKeyDown="if(this.value.length==16 && event.keyCode!=8)"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif", sans-serif;>Date of Birth (MM/DD/YYYY)</div>
|
||||
<input id="dateofbirth" type="text" name="dateofbirth" class="" placeholder="Date of Birth (MM/DD/YYYY)" dateformat="M d y" min="01/01/1900" max="12/31/2020" onfocus="(this.type='date')"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif", sans-serif;>Height</div>
|
||||
<input id="height" type="number" class="" name="height" min="48" max="96" placeholder="Height" onKeyDown="if(this.value.length==2 && event.keyCode!=8)"><br>
|
||||
<center>
|
||||
<div class="radio-toolbar">
|
||||
<input type="radio" id="radiom" name="sex" value="m" checked>
|
||||
@@ -22,11 +28,11 @@
|
||||
<label for="radiof">Female</label>
|
||||
</div>
|
||||
</center>
|
||||
<div class="range-wrap" style="width: 80%;">
|
||||
<!-- <div class="range-wrap" style="width: 80%;">
|
||||
<input type="range" id="height" class="range" min="48" max="96" value="48">
|
||||
<output class="bubble"></output>
|
||||
</div>
|
||||
<button id="submit" type="submit"><font size="5px">Submit</font></button>
|
||||
</div> -->
|
||||
<button id="submit" type="submit"><font size="4px">Submit</font></button>
|
||||
</form>
|
||||
<center><font size="1px" color="red">If the submit button doesn't work, please ensure that you've entered the fields correctly.</font></center>
|
||||
</div>
|
||||
@@ -67,41 +73,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function checkFirstName() {
|
||||
var value = myFirstName.value;
|
||||
if(value.trim().match(/^[a-zA-Z][0-9a-zA-Z .,'-]*$/) == null) {
|
||||
myFirstName.style.backgroundColor = '#E06666';
|
||||
myFirstName.style.color = 'black';
|
||||
}
|
||||
else {
|
||||
if(value.length > 0 && value.length < 17) {
|
||||
myFirstName.style.backgroundColor = '#B6D7A8';
|
||||
myFirstName.style.color = 'black';
|
||||
}
|
||||
else {
|
||||
myFirstName.style.backgroundColor = '#E06666';
|
||||
myFirstName.style.color = 'black';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkLastName() {
|
||||
var value = myLastName.value;
|
||||
if(value.trim().match(/^[a-zA-Z][0-9a-zA-Z .,'-]*$/) == null) {
|
||||
myLastName.style.backgroundColor = '#E06666';
|
||||
myLastName.style.color = 'black';
|
||||
}
|
||||
else {
|
||||
if(value.length > 0 && value.length < 17) {
|
||||
myLastName.style.backgroundColor = '#B6D7A8';
|
||||
myLastName.style.color = 'black';
|
||||
}
|
||||
else {
|
||||
myLastName.style.backgroundColor = '#E06666';
|
||||
myLastName.style.color = 'black';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkDOB() {
|
||||
var date = new Date($('#dateofbirth').val());
|
||||
@@ -125,30 +96,6 @@
|
||||
month = dateArray[1];
|
||||
day= dateArray[3];
|
||||
year = dateArray[5];
|
||||
|
||||
if (month < 1 || month > 12){
|
||||
myDOB.style.backgroundColor = '#E06666';
|
||||
myDOB.style.color = 'black';
|
||||
}
|
||||
else if (day < 1 || day> 31) {
|
||||
myDOB.style.backgroundColor = '#E06666';
|
||||
myDOB.style.color = 'black';
|
||||
}
|
||||
else if ((month==4 || month==6 || month==9 || month==11) && day ==31) {
|
||||
myDOB.style.backgroundColor = '#E06666';
|
||||
myDOB.style.color = 'black';
|
||||
}
|
||||
else if (month == 2) {
|
||||
var isLeapYear = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0));
|
||||
if (day> 29 || (day ==29 && !isLeapYear)){
|
||||
myDOB.style.backgroundColor = '#E06666';
|
||||
myDOB.style.color = 'black';
|
||||
}
|
||||
}
|
||||
else {
|
||||
myDOB.style.backgroundColor = '#B6D7A8';
|
||||
myDOB.style.color = 'black';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<div class="dialog">
|
||||
<img id="logo" src="img/esx_identity.png" height="110px" width="332px">
|
||||
<form id="register" name="register" action="#">
|
||||
<input id="firstname" type="text" class="" name="firstname" placeholder="First Name (Max 16 Characters)" onKeyDown="if(this.value.length==16 && event.keyCode!=8) return false;" onkeypress="if (isNumber(event) == true) return false;" onKeyUp="checkFirstName()" onmouseup="checkFirstName()"><br>
|
||||
<input id="lastname" type="text" class="" name="lastname" placeholder="Last Name (Max 16 Characters)" onKeyDown="if(this.value.length==16 && event.keyCode!=8) return false;" onkeypress="if (isNumber(event) == true) return false;" onKeyUp="checkLastName()" onmouseup="checkLastName()"><br>
|
||||
<input id="dateofbirth" type="text" name="dateofbirth" class="" placeholder="Date of Birth (MM/DD/YYYY)" dateformat="M d y" min="01/01/1900" max="12/31/2020" onfocus="(this.type='date')" onkeypress="if ( isNaN(String.fromCharCode(event.keyCode) )) return false;" onchange="checkDOB()" onKeyUp="checkDOB()" onmouseup="checkDOB()"><br>
|
||||
<input id="firstname" type="text" class="" name="firstname" placeholder="First Name (Max 16 Characters)" onKeyDown="if(this.value.length==16 && event.keyCode!=8) return false;" onkeypress="if (isNumber(event) == true)"><br>
|
||||
<input id="lastname" type="text" class="" name="lastname" placeholder="Last Name (Max 16 Characters)" onKeyDown="if(this.value.length==16 && event.keyCode!=8) return false;" onkeypress="if (isNumber(event) == true)"><br>
|
||||
<input id="dateofbirth" type="text" name="dateofbirth" class="" placeholder="Date of Birth (MM/DD/YYYY)" dateformat="M d y" min="01/01/1900" max="12/31/2020" onfocus="(this.type='date')" onkeypress="if ( isNaN(String.fromCharCode(event.keyCode) ))"><br>
|
||||
<center>
|
||||
<div class="radio-toolbar">
|
||||
<input type="radio" id="radiom" name="sex" value="m" checked>
|
||||
@@ -22,10 +22,10 @@
|
||||
<label for="radiof">Female</label>
|
||||
</div>
|
||||
</center>
|
||||
<div class="range-wrap" style="width: 80%;">
|
||||
<!-- <div class="range-wrap" style="width: 80%;">
|
||||
<input type="range" id="height" class="range" min="48" max="96" value="48">
|
||||
<output class="bubble"></output>
|
||||
</div>
|
||||
</div> -->
|
||||
<button id="submit" type="submit"><font size="5px">Submit</font></button>
|
||||
</form>
|
||||
<center><font size="1px" color="red">If the submit button doesn't work, please ensure that you've entered the fields correctly.</font></center>
|
||||
|
||||
@@ -22,7 +22,7 @@ $(function() {
|
||||
const mo = new Intl.DateTimeFormat('en', { month: '2-digit' }).format(dateCheck)
|
||||
const da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(dateCheck)
|
||||
|
||||
var formattedDate = `${mo}/${da}/${ye}`;
|
||||
var formattedDate = `${da}/${mo}/${ye}`;
|
||||
|
||||
$.post('http://esx_identity/register', JSON.stringify({
|
||||
firstname: $("#firstname").val(),
|
||||
|
||||
Reference in New Issue
Block a user