mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added adminpanel to this repo
This commit is contained in:
18
server/public/assets/admin/not_authenticated/js/main.js
Normal file
18
server/public/assets/admin/not_authenticated/js/main.js
Normal file
@@ -0,0 +1,18 @@
|
||||
$(document).on("click", "#login_button", function(e){
|
||||
e.preventDefault();
|
||||
$("#login_form").submit();
|
||||
})
|
||||
|
||||
$(document).ready(function(){
|
||||
if(window.location.pathname == "/signup/" || window.location.pathname == "/signup"){
|
||||
$("#login_form").prepend("<input type='text' name='token' placeholder='Token' required autocomplete='off' />");
|
||||
$("#login_form").attr("action", "/signup");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).on("submit", "#login_form", function(e){
|
||||
if(this.password.value == "" || this.username.value == ""){
|
||||
e.preventDefault();
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user