jewelry_inventory/templates/metal_form.html
2026-03-27 12:02:41 +05:00

28 lines
1.1 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>{% if metal %}✏️ Редактирование металла{% else %}➕ Добавление металла{% endif %}</h1>
<form method="post" class="form-card">
<div class="form-group">
<label>Название металла *</label>
<input type="text" name="name" value="{{ metal.name if metal else '' }}" required>
</div>
<div class="form-group">
<label>Проба *</label>
<input type="number" name="purity" value="{{ metal.purity if metal else '' }}" required>
<small>Например: 585, 750, 925, 950</small>
</div>
<div class="form-group">
<label>Цена за грамм (₽) *</label>
<input type="number" step="0.01" name="price_per_gram" value="{{ metal.price_per_gram if metal else '' }}" required>
</div>
<div style="display: flex; gap: 10px;">
<button type="submit" class="btn btn-primary">💾 Сохранить</button>
<a href="/metal_types" class="btn btn-secondary">❌ Отмена</a>
</div>
</form>
{% endblock %}