Angemeldet bleiben

This commit is contained in:
aschwarz
2023-03-29 16:22:45 +02:00
parent a675b295e7
commit 670599777b
62 changed files with 1668 additions and 14210 deletions

View File

@ -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{

View File

@ -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."
);
}
}
};