zxcqwe/templates/add_medicine.html

45 lines
1.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block content %}
<h2>Добавить лекарство</h2>
<form method="POST">
<div class="mb-3">
<label>Название</label>
<input type="text" name="name" class="form-control" required>
</div>
<div class="mb-3">
<label>Категория</label>
<select name="category_id" class="form-control" required>
{% for c in categories %}
<option value="{{ c.id }}">{{ c.name }}</option>
{% endfor %}
</select>
</div>
<div class="mb-3">
<label>Производитель</label>
<select name="manufacturer_id" class="form-control" required>
{% for m in manufacturers %}
<option value="{{ m.id }}">{{ m.name }}</option>
{% endfor %}
</select>
</div>
<div class="mb-3">
<label>Цена</label>
<input type="number" step="0.01" name="price" class="form-control" required>
</div>
<div class="mb-3">
<label>Срок годности (ГГГГ-ММ-ДД)</label>
<input type="date" name="expiration_date" class="form-control" required>
</div>
<div class="mb-3">
<label>Количество на складе</label>
<input type="number" name="stock_quantity" class="form-control" required>
</div>
<div class="mb-3">
<label>Сезонный коэффициент</label>
<input type="number" step="0.1" name="season_coeff" class="form-control" value="1.0">
</div>
<button type="submit" class="btn btn-primary">Добавить</button>
<a href="/" class="btn btn-secondary">Отмена</a>
</form>
{% endblock %}