mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 21:45:41 +00:00
64 lines
1.7 KiB
HTML
64 lines
1.7 KiB
HTML
{% extends "base.html" %}
|
|
{% load static %}
|
|
|
|
|
|
{% block 'head' %}
|
|
<link rel="stylesheet" href="{% static 'products/css/products.css' %}">
|
|
|
|
|
|
{% endblock %}
|
|
|
|
{% block 'title' %}
|
|
Produtos
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block 'body' %}
|
|
|
|
|
|
<body>
|
|
<div class="grid-container">
|
|
<div class="pico"><input class="pico" type="text"></div>
|
|
<button class="pico" id="openModal">Adicionar Novo Produto</button>
|
|
|
|
{% for product in products %}
|
|
|
|
<div class="card">
|
|
{{product.name}}
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
</div>
|
|
</body>
|
|
|
|
|
|
|
|
<div class="modal" id="Modal-create-product">
|
|
<div class="modal-content">
|
|
<form action="{% url 'create_product' %}" id="productForm" method="post" >
|
|
{% csrf_token %}
|
|
<h2>Cadastro de Produto</h2>
|
|
<input type="text" id="productName" name="name" required placeholder="Nome"><br>
|
|
<input type="number" step="0.01" id="productPrice" name="price" required placeholder="Preço"><br>
|
|
<input type="number" step="1" id="productqtd" name="qtd" placeholder="Quantidade"><br>
|
|
<select name="select-categorie" >
|
|
|
|
{% for categorie in categories %}
|
|
<option value="{{categorie.id}}">{{categorie.name}}</option>
|
|
{% endfor %}
|
|
|
|
</select>
|
|
<textarea id="productDescription" name="description" rows="4" placeholder="Descrição"></textarea><br>
|
|
<button type="submit">Salvar</button>
|
|
<button type="button" onclick="closeModal()" style="background-color:red;">Fechar</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script src="{% static 'products/js/products.js' %}"></script>
|
|
|
|
{% endblock %} |