-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
96 lines (84 loc) · 4.42 KB
/
index.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
<!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>Contatos</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
</head>
<body>
<h1 class="md-5">Contatos</h1>
<hr>
<!-- Button trigger modal -->
<div class="row">
<div class="col">
<input id="input_busca" onkeyup="filtrar()" type="text" class="form-control" placeholder="Buscar">
</div>
<div class="col text-end">
<button type="button" class="btn btn-primary mb-3" data-bs-toggle="modal" data-bs-target="#exampleModal">
Novo Contato
</button>
</div>
</div>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Nome</th>
<th>Cidade</th>
<th>Número</th>
<th>Ações</th>
</tr>
</thead>
<tbody id="tabela_contatos"></tbody>
</table>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Novo Contato</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form id="form_add" onsubmit="inserir()">
<div class="modal-body">
<input class="form-control form-control-lg mb-3" id="input_nome" placeholder="Nome">
<input type="text" class="form-control form-control-lg mb-3" id="input_cidade" placeholder="Cidade">
<input type="text" class="form-control form-control-lg mb-3" id="input_numero" placeholder="Número">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancelar</button>
<button type="submit" class="btn btn-primary">Pronto</button>
</div>
</form>
</div>
</div>
</div>
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasEditar" aria-labelledby="offcanvasExampleLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasExampleLabel">Editar Contato</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<form id="form_editar" onsubmit="editar()">
<input type="hidden" id="input_editar_id">
<label for="input_editar_nome">Nome</label>
<input type="text" id="input_editar_nome" class="form-control mb-3">
<label for="input_editar_cidade">Cidade</label>
<input type="text" id="input_editar_cidade" class="form-control mb-3">
<label for="input_editar_numero">Número</label>
<input type="text" id="input_editar_numero" class="form-control mb-3">
<div class="d-grid">
<button class="btn btn-primary">Enviar</button>
</div>
</form>
</div>
</div>
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-u1OknCvxWvY5kfmNBILK2hRnQC3Pr17a+RTT6rIHI7NnikvbZlHgTPOOmMi466C8" crossorigin="anonymous"></script>
<script src="eventos.js"></script>
<script src="filtrar.js"></script>
</body>
</html>