-
Notifications
You must be signed in to change notification settings - Fork 0
/
produto-formulario.html
78 lines (76 loc) · 4.28 KB
/
produto-formulario.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
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Adicionar Produto</title>
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
<link rel="stylesheet" href="static/css/styles.css">
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light shadow-sm">
<div class="container-fluid">
<a class="navbar-brand" href="#"><i class="bi bi-shop"></i> FSSS</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/"><i class="bi bi-house-door"></i> Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-box-seam"></i> Produto
</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/produto-formulario"><i class="bi bi-plus-circle"></i> Cadastrar Produto</a></li>
<li><a class="dropdown-item" href="/produtos-lista"><i class="bi bi-card-list"></i> Listar Produtos</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div class="container mt-5">
<h2 class="text-center mb-4"><i class="fas fa-plus-circle"></i> Adicionar Produto</h2>
<form id="produto-form" method="post" action="/adiciona-produto">
<input type="hidden" name="id" value="{{.ID}}">
<div class="form-row">
<div class="form-group col-md-6">
<label for="nome"><i class="fas fa-tag"></i> Nome:</label>
<input type="text" class="form-control" name="nome" value="{{.Nome}}" required>
</div>
<div class="form-group col-md-6">
<label for="preco"><i class="fas fa-dollar-sign"></i> Preço:</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">R$</span>
</div>
<input type="text" class="form-control" id="preco" name="preco" value="{{.Preco}}" required>
</div>
</div>
<div class="form-group col-md-6">
<label for="quantidade"><i class="fas fa-dollar-sign"></i> Quantidade:</label>
<div class="input-group">
<input type="text" class="form-control" id="quantidade" name="quantidade" value="{{.Quantidade}}" required>
</div>
</div>
</div>
<div class="form-group">
<label for="descricao"><i class="fas fa-info-circle"></i> Descrição:</label>
<textarea class="form-control" name="descricao" rows="3">{{.Descricao}}</textarea>
</div>
<div class="d-flex justify-content-between">
<a href="/produtos-lista" class="btn btn-secondary"><i class="fas fa-arrow-left"></i> Voltar</a>
<button type="submit" class="btn btn-success"><i class="fas fa-save"></i> Salvar</button>
</div>
</form>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="static/js/bootstrap.bundle.js"></script>
<script src="assets/js/form-validation.js"></script>
</body>
</html>