61 lines
2.0 KiB
HTML
61 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="cs">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Vytvořit Novou Opravu</title>
|
|
<link rel="stylesheet" href="{{url_for('static', filename='css/style.css')}}">
|
|
</head>
|
|
<body>
|
|
|
|
<header>
|
|
<div class="header">
|
|
<h1>Vytvořit Novou Opravu</h1>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="container">
|
|
<form action="{{ url_for('create_repair') }}" method="post" class="form-container">
|
|
<label for="id_zamestnance">Zaměstnanec:</label>
|
|
<select id="id_zamestnance" name="id_zamestnance" required>
|
|
<option value="" disabled selected>Vyberte zaměstnance</option>
|
|
{% for employee in employees %}
|
|
<option value="{{ employee['ID_Uzivatele'] }}">{{ employee['Jmeno'] }} {{ employee['Prijmeni'] }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
|
|
<label for="nazev">Název:</label>
|
|
<input type="text" id="nazev" name="nazev" required>
|
|
|
|
<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>
|
|
|
|
<footer class="footer">
|
|
<div>Made by Hrachovina</div>
|
|
</footer>
|
|
|
|
<script src="{{ url_for('static', filename='scripts/products.js') }}"></script>
|
|
|
|
</body>
|
|
</html> |