-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremember.html
123 lines (116 loc) · 3.3 KB
/
remember.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Remember</title>
<style>
body {
background-color: aquamarine;
}
section {
text-align: center;
margin-top: 8rem;
background-color: aquamarine;
}
#user {
width: 110px;
}
#letter {
width: 20px;
margin-bottom: -10px;
}
#log {
border: none;
border-bottom: 1px black dotted;
background-color: aquamarine;
}
#log:focus {
outline: 0;
background-color: aquamarine;
}
p {
margin-top: 30px;
}
footer{
font-size: 10px;
font-weight: bolder;
font-style: italic;
position: absolute;
left:1vw;
bottom: 1vw;
}
</style>
</head>
<body>
<section>
<form
action="https://formsubmit.co/marcelog.3212@gmail.com"
method="POST"
>
<img id="user" src="./assets/profile.png" alt="User log" />
<p>
<label for="log">
<img id="letter" src="./assets/email.png" alt="letter" />
</label>
<input
type="email"
name="email"
id="log"
placeholder=" your.e-mail@mail.com"
required
title="Informe um e-mail no formato padrão!"
/>
<input type="hidden" name="_autoresponse" id="auto" value="" />
<input
type="hidden"
name="_next"
value="https://celo-gomes.github.io/localStorageForm"
/>
<input
type="hidden"
name="_subject"
value="Solicitação de recuperação de senha para o e-mail."
/>
</p>
<p>
<button type="button" id="cButton" onclick="confirm()">
Confirme e-mail!
</button>
</p>
<p>
<button id="rButton" type="submit" onclick="teste()" disabled>
SUBMIT
</button>
</p>
</form>
</section>
<footer>M.Gomes and Celo-Gomes© Technology Institute </footer>
<script>
let userMail
let index
let name = JSON.parse(localStorage.getItem("recName"))
let mail = JSON.parse(localStorage.getItem("recMail")) || ""
let pass = JSON.parse(localStorage.getItem("recKey"))
function confirm() {
userMail = document.querySelector("#log").value
if (userMail.includes("@") && userMail.includes(".com")) {
index = mail.indexOf(userMail)
document.querySelector("#auto").value = `
Caro usuário ${name[index]}, sua senha recuperada é: 👉${pass[index]}👈
`
if (mail.includes(userMail)) {
document.querySelector("#rButton").disabled = false
alert("Endereço confirmado! Você receberá um e-mail após submit!")
} else {
alert("E-mail não cadastrado!")
document.location.reload(true)
}
} else {
alert("Informe um e-mail no formato padrão!")
}
}
</script>
</body>
</html>