Angemeldet bleiben
This commit is contained in:
@ -1,6 +1,13 @@
|
||||
function login(){
|
||||
var mail = document.getElementById("mail").value;
|
||||
var password = document.getElementById("password").value;
|
||||
var angemeldet_bleiben = document.getElementById("angemeldet_bleiben");
|
||||
|
||||
if(angemeldet_bleiben.checked == true){
|
||||
var angemeldet_bleiben = 1;
|
||||
}else{
|
||||
var angemeldet_bleiben = 0;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
@ -8,7 +15,8 @@ function login(){
|
||||
data: {
|
||||
'function': 'login',
|
||||
'mail': mail,
|
||||
'password': password
|
||||
'password': password,
|
||||
'angemeldet_bleiben': angemeldet_bleiben
|
||||
},
|
||||
success: function(result) { //we got the response
|
||||
if(result!=''){
|
||||
@ -19,7 +27,7 @@ function login(){
|
||||
$('#msg').show().delay(1000).fadeOut(500);
|
||||
$('#msg').html(a[0]);
|
||||
$(document).ajaxStop(function(){
|
||||
setTimeout(() => { window.location = "startseite.php"; }, 1000);
|
||||
setTimeout(() => { window.location = "index.php"; }, 1000);
|
||||
});
|
||||
|
||||
}else{
|
||||
|
@ -1,23 +0,0 @@
|
||||
var ShowPasswordToggle = document.querySelector("[type='password']");
|
||||
ShowPasswordToggle.onclick = function () {
|
||||
document.querySelector("[type='password']").classList.add("input-password");
|
||||
document.getElementById("toggle-password").classList.remove("d-none");
|
||||
|
||||
const passwordInput = document.querySelector("[type='password']");
|
||||
const togglePasswordButton = document.getElementById("toggle-password");
|
||||
|
||||
togglePasswordButton.addEventListener("click", togglePassword);
|
||||
function togglePassword() {
|
||||
if (passwordInput.type === "password") {
|
||||
passwordInput.type = "text";
|
||||
togglePasswordButton.setAttribute("aria-label", "Hide password.");
|
||||
} else {
|
||||
passwordInput.type = "password";
|
||||
togglePasswordButton.setAttribute(
|
||||
"aria-label",
|
||||
"Show password as plain text. " +
|
||||
"Warning: this will display your password on the screen."
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user