-
Notifications
You must be signed in to change notification settings - Fork 2
/
dashboard-crear-producto.html
178 lines (146 loc) · 7.67 KB
/
dashboard-crear-producto.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html>
<html lang="es">
<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">
<link rel="icon" type="image/x-icon" href="./assets/img/favicon.ico" />
<link rel="stylesheet" href="./assets/css/dashoboard.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<link href="https://fonts.cdnfonts.com/css/josefin-sans" rel="stylesheet">
<title>Agregar Productos - Vianda Market</title>
</head>
<body>
<header>
<div class="headerQuick">
</div>
<div class="fixheader"></div>
</header>
<div class="title">
<h1>AGREGAR PRODUCTOS</h1>
</div>
<section class="text-center">
<div class="rowUno container-fluid formulario-fondo d-flex align-items-center justify-content-center">
<main>
</section>
<section class="fondoform">
<div class="container contenedorform1">
<div class="contenedorform">
<div class="row justify-content-center">
<div class="col-md-8">
<h4 class="titulo4 mb-3 text-center">Agregar Productos</h4>
<div class="alert alert-danger fade show" style="display:none;" role="alert" id="alertValidaciones">
<p id="alertValidacionesTexto"></p>
</div>
<form class="needs-validation" novalidate>
<div class="row">
<div class=" textoform2 col-12 col-md-6 mb-3">
<label for="Name">Nombre</label>
<input type="text" class="form-control form-dash" id="Nombre" autofocus placeholder="Ingresa el nombre del producto" required>
<div class="invalid-feedback">
Por favor, ingresa un nombre válido.
</div>
</div>
<div class=" textoform2 col-12 col-md-6 mb-3">
<label for="Brand">Precio</label>
<input type="text" class="form-control form-dash" id="Precio" autofocus placeholder="Ingresa la marca del producto" required>
<div class="invalid-feedback">
Por favor, ingresa una precio válida.
</div>
</div>
<div class=" textoform2 col-12 col-md-6 mb-3">
<label for="Quality">Descripición</label>
<input type="text" class="form-control form-dash" id="descri" autofocus placeholder="Ingresa la calidad del producto" required>
<div class="invalid-feedback">
Por favor, ingresa una calidad válida.
</div>
</div>
<div class=" textoform2 col-12 col-md-6 mb-3">
<label for="Origin">Cantidad disponible</label>
<input type="text" class="form-control form-dash" id="canti" autofocus placeholder="Ingresa el origen del producto" required>
<div class="invalid-feedback">
Por favor, ingresa cantidad disponible.
</div>
</div>
<div class=" textoform2 col-12 col-md-6 mb-3">
<label for="Origin">Id calidades</label>
<input type="text" class="form-control form-dash" id="idcali" autofocus placeholder="Ingresa el origen del producto" required>
<div class="invalid-feedback">
Por favor, ingresa la identificación de calidades.
</div>
</div>
<div class=" textoform2 col-12 col-md-6 mb-3">
<label for="Origin">Id gramos</label>
<input type="text" class="form-control form-dash" id="idgramos" autofocus placeholder="Ingresa el origen del producto" required>
<div class="invalid-feedback">
Por favor, ingresa la identificación de gramos.
</div>
</div>
<div class=" textoform2 col-12 col-md-6 mb-3">
<label for="Photo">Foto</label>
<br>
<button id="upload_widget" class="cloudinary-button botonCloudinary" type="button">Subir Foto</button>
<div class="inputs"></div>
<br>
<input type="text" class="form-control form-dash" id="Photo"
placeholder="Ingresa la URL de la foto del producto" required>
<div class="invalid-feedback">
Por favor, ingresa una URL de foto válida.
</div>
</div>
<!-- Este div manda la alerta -->
<div class="position-fixed bottom-0 end-0 p-3 form-dash" id= "divAlert" style="z-index: 11">
</div>
</div>
<div class="text-center">
<button id="btnAgregar" class="btn btn-primary btn-lg btn-block form-dash" type="button">Agregar</button>
<button id="btnClear" class="btn btn-secondary btn-lg btn-block form-dash" type="button">Limpiar todo</button>
<hr class="mb-4">
</div>
</form>
</div>
</section>
<footer>
<div class="footer">
</div>
</div>
</footer>
<script src="https://upload-widget.cloudinary.com/global/all.js" type="text/javascript"></script>
<script type="text/javascript">
let foto = document.getElementById("Photo")
var myWidget = cloudinary.createUploadWidget({
cloudName: 'dw1mig7ts',
uploadPreset: 'ViandaMarket'
}, (error, result) => {
if (!error && result && result.event === "success") {
foto.value = result.info.secure_url;
}
}
)
document.getElementById("upload_widget").addEventListener("click", function () {
myWidget.open();
}, false);
</script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/eb496ab1a0.js" crossorigin="anonymous"></script>
<script src="https://kit.fontawesome.com/eb496ab1a0.js" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
<script src="./assets/js/footer.js"></script>
<script src="./assets/js/header.js"></script>
<script src="./assets/js/dashboard-crear-producto.js" type="module"></script>
<!-- <script src="../js/main.js"></script>
<script src="../js/carrito.js"></script> -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4"
crossorigin="anonymous"></script>
</body>
</html>