final version, submitted to teacher
This commit is contained in:
@@ -30,6 +30,23 @@
|
||||
<label for="popis">Popis:</label>
|
||||
<textarea id="popis" name="popis" required></textarea>
|
||||
|
||||
<h3>Použité Produkty</h3>
|
||||
<div id="product-container">
|
||||
<div class="product-item" id="product-item-0">
|
||||
<label for="product_0">Produkt:</label>
|
||||
<select id="product_0" name="products[0][id]" required>
|
||||
<option value="" disabled selected>Vyberte produkt</option>
|
||||
{% for product in products %}
|
||||
<option value="{{ product['ID_Produktu'] }}">{{ product['Nazev'] }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<label for="quantity_0">Množství:</label>
|
||||
<input type="number" id="quantity_0" name="products[0][quantity]" value="0" min="0" required>
|
||||
<button type="button" onclick="removeProduct(0)">Odstranit</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onclick="addProduct()">Přidat Produkt</button>
|
||||
|
||||
<button type="submit" class="button">Vytvořit</button>
|
||||
</form>
|
||||
</div>
|
||||
@@ -38,5 +55,7 @@
|
||||
<div>Made by Hrachovina</div>
|
||||
</footer>
|
||||
|
||||
<script src="{{ url_for('static', filename='scripts/products.js') }}"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user