Some changes have been made

This commit is contained in:
Abdulaziz Axmadaliyev
2026-02-18 17:28:30 +05:00
parent 3691e2d068
commit 243d879243
41 changed files with 566 additions and 884 deletions

View File

@@ -1,10 +1,10 @@
{% extends "base.html" %}
{% block title %}{{ title|default:"Yaratish" }}{% endblock %}
{% block title %}{{ title|default:"Kirim qoshish" }}{% endblock %}
{% block content %}
<div class="form-container">
<h2>{{ title|default:"Yaratish" }}</h2>
<h2>{{ title|default:"Kirim qoshish" }}</h2>
<a href="{% url 'income_list' %}" class="back-btn">
<svg xmlns="http://www.w3.org/2000/svg" class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor"
@@ -17,18 +17,32 @@
<form method="post" novalidate>
{% csrf_token %}
{% for field in form %}
<!-- Warehouse -->
<div class="form-group">
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
{{ field }}
{% if field.help_text %}
<small class="help-text">{{ field.help_text }}</small>
{% endif %}
{% for error in field.errors %}
<div class="error">{{ error }}</div>
<label for="{{ form.warehouse.id_for_label }}">Ombor</label>
{{ form.warehouse }}
{% for error in form.warehouse.errors %}
<div class="error">{{ error }}</div>
{% endfor %}
</div>
<!-- Toys Count -->
<div class="form-group">
<label for="{{ form.toys_count.id_for_label }}">Oyinchoqlar soni</label>
{{ form.toys_count }}
{% for error in form.toys_count.errors %}
<div class="error">{{ error }}</div>
{% endfor %}
</div>
<!-- Price Per Toy -->
<div class="form-group">
<label for="{{ form.price_per_toy.id_for_label }}">Bir dona narxi</label>
{{ form.price_per_toy }}
{% for error in form.price_per_toy.errors %}
<div class="error">{{ error }}</div>
{% endfor %}
</div>
{% endfor %}
<button type="submit" class="submit-btn">
{% if title %}{{ title }}{% else %}Saqlash{% endif %}
@@ -85,7 +99,6 @@
margin-bottom: 16px;
display: flex;
flex-direction: column;
transition: all 0.2s ease;
}
.form-group label {
@@ -110,12 +123,6 @@
box-shadow: 0 0 0 2px rgba(79,70,229,0.2);
}
.help-text {
font-size: 12px;
color: #6b7280;
margin-top: 4px;
}
.error {
font-size: 12px;
color: #ef4444;
@@ -140,11 +147,11 @@
transform: translateY(-1px);
}
/* Mobile adjustments */
@media (max-width: 480px) {
.form-container {
padding: 20px 16px;
}
}
</style>
{% endblock %}