project/templates/edit_product.html

63 lines
2.6 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 %}
<h1>✏️ Редактировать товар</h1>
<div style="max-width: 600px; margin: 0 auto;">
<form method="POST" style="background: #FDF5E6; padding: 2rem; border-radius: 10px;">
<div class="form-group">
<label>Название *</label>
<input type="text" name="name" value="{{ product.name }}" required style="width: 100%; padding: 0.5rem;">
</div>
<div class="form-group">
<label>Производитель</label>
<input type="text" name="manufacturer" value="{{ product.manufacturer }}" style="width: 100%; padding: 0.5rem;">
</div>
<div class="form-group">
<label>Категория</label>
<input type="text" name="product_type" value="{{ product.product_type }}" style="width: 100%; padding: 0.5rem;">
</div>
<div class="form-group">
<label>Цена закупки (₽)</label>
<input type="number" name="purchase_price" value="{{ product.purchase_price }}" step="0.01" style="width: 100%; padding: 0.5rem;">
</div>
<div class="form-group">
<label>Цена продажи (₽)</label>
<input type="number" name="selling_price" value="{{ product.selling_price }}" step="0.01" style="width: 100%; padding: 0.5rem;">
</div>
<div class="form-group">
<label>Срок годности</label>
<input type="text" name="expiry_date" value="{{ product.expiry_date }}" placeholder="дд.мм.гггг" style="width: 100%; padding: 0.5rem;">
<small style="color: #666;">📅 Формат: 31.12.2026</small>
</div>
<div class="form-group">
<label>Остаток на складе</label>
<input type="number" name="stock_quantity" value="{{ product.stock_quantity }}" style="width: 100%; padding: 0.5rem;">
</div>
<div style="display: flex; gap: 1rem;">
<button type="submit" style="background: #CD853F; color: white; padding: 0.5rem 1rem; border: none; border-radius: 5px;">💾 Сохранить</button>
<a href="/products" style="background: #666; color: white; padding: 0.5rem 1rem; text-decoration: none; border-radius: 5px;">❌ Отмена</a>
</div>
</form>
</div>
<style>
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: bold;
color: #CD853F;
}
</style>
{% endblock %}