Made the expiration picker better for the Session Manager

This commit is contained in:
2022-02-28 13:41:26 -05:00
parent 09f5c92d55
commit 5ea7f52633
2 changed files with 2 additions and 2 deletions

View File

@@ -49,6 +49,6 @@ $(document).ready(function() {
}
ajax.open("POST", `/api/key.php`);
ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
ajax.send(`create=${$("#expire").val()}&key='${getCookie('user')}'`);
ajax.send(`create=${Date.parse($("#expire").val())/1000}&key='${getCookie('user')}'`);
});
});

View File

@@ -32,7 +32,7 @@
</table>
<h3>Create Session or api key below here:</h3>
<div>
<label for="expire">Expiration(0 means that it will never expire): </label><input type='number' value=<?php echo time();?> id="expire" style="width: 100px;"><br>
<label for="expire">Expiration: </label><input type='datetime-local' id="expire"><br>
<button id='create'>Create</button>
</div>
<?php