-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuspeito.html
112 lines (102 loc) · 4.33 KB
/
suspeito.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/main.css">
<link rel="stylesheet" href="../css/suspeito.css">
<!-- MOBILE FIRST-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
</head>
<body class="bg-dark">
<h2>Informações Endereço</h2>
<div id="formulario" >
<form action="https://covidrn.herokuapp.com/api/sintomatico" method="POST">
<div class="form-group">
<label for="exampleFormControlInput1">Nome Completo</label>
<input type="text" class="form-control" id="nome" name="nome">
</div>
<div class="form-group">
<label for="address">Endereço</label>
<input type="text" class="form-control" id="endereco" name="endereco">
</div>
<div class="form-group">
<label for="number">Numero</label>
<input type="text" class="form-control" id="numero" name="numero">
</div>
<div class="form-group">
<label for="neighbourhood">Bairro</label>
<input type="text" class="form-control" id="bairro" name="bairro">
</div>
<div class="form-group">
<label for="city">Cidade</label>
<input type="text" id="uppercase" class="form-control" id="cidade" name="cidade">
</div>
<div class="form-group">
<label for="exampleFormControlSelect1">Selecione o Estado</label>
<select class="form-control" id="uf" name="uf">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>
<option value="MA">Maranhão</option>
<option value="MT">Mato Grosso</option>
<option value="MS">Mato Grosso do Sul</option>
<option value="MG">Minas Gerais</option>
<option value="PA">Pará</option>
<option value="PB">Paraíba</option>
<option value="PR">Paraná</option>
<option value="PE">Pernambuco</option>
<option value="PI">Piauí</option>
<option value="RJ">Rio de Janeiro</option>
<option value="RN">Rio Grande do Norte</option>
<option value="RS">Rio Grande do Sul</option>
<option value="RO">Rondônia</option>
<option value="RR">Roraima</option>
<option value="SC">Santa Catarina</option>
<option value="SP">São Paulo</option>
<option value="SE">Sergipe</option>
<option value="TO">Tocantins</option>
</select>
</div>
<div id="btn-enviar">
<button onclick="submitSuspect(this)" class="btn btn-info btn-lg">Submit</button>
</div>
</div>
</form>
<script src="./js/controller.js"></script>
<script>
function submitSuspect(form){
//event.preventDefault();
fetch('https://covidrn.herokuapp.com/api/sintomatico',{
method: "post",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
nome: form.nome,
endereco: form.endereco,
numero: form.numero,
bairro: form.bairro,
cidade: form.cidade,
uf: form.uf
})
})
.then(res => res.json()
.then(window.location.href="https://friendly-lumiere-51b436.netlify.app/checkubs.html")
);
}
jQuery('#uppercase').keyup(function(){
$(this).val($(this).val().toUpperCase());
});
</script>
</body>
</html>