feat: update order payment methods and refine profile edit functionality
All checks were successful
Build and Push Docker Image / build (push) Successful in 43s

- Replaced `Order.PaymentMethod` options with "cash" and "card" while adjusting related code and templates
- Set "cash" as the default payment method for orders and checkout forms
- Added profile editing functionality with `ProfileForm`, allowing users to update names
- Improved feedback messages across profile and order management templates
- Updated catalog to handle empty filter results with a "reset filters" option
This commit is contained in:
2026-05-30 12:25:19 +02:00
parent d4fa91ac7f
commit ad962d946b
18 changed files with 171 additions and 36 deletions

View File

@@ -24,7 +24,48 @@
<div class="auth-copy-block">
<h2 class="auth-panel-title">Данные аккаунта</h2>
<p class="auth-panel-text"><strong>Email:</strong> {{ request.user.email }}</p>
<p class="auth-panel-text"><strong>Имя:</strong> {{ request.user.get_full_name|default:"Не указано" }}</p>
{% if messages %}
{% for message in messages %}
<p class="auth-panel-text">{{ message }}</p>
{% endfor %}
{% endif %}
<form class="auth-form" method="post" action="{% url 'users:profile' %}">
{% csrf_token %}
<div class="auth-field">
<label for="{{ form.first_name.id_for_label }}">Имя</label>
<input
id="{{ form.first_name.id_for_label }}"
name="{{ form.first_name.html_name }}"
type="text"
value="{{ form.first_name.value|default:'' }}"
autocomplete="given-name"
required
>
{% for error in form.first_name.errors %}
<p class="auth-field-error">{{ error }}</p>
{% endfor %}
</div>
<div class="auth-field">
<label for="{{ form.last_name.id_for_label }}">Фамилия</label>
<input
id="{{ form.last_name.id_for_label }}"
name="{{ form.last_name.html_name }}"
type="text"
value="{{ form.last_name.value|default:'' }}"
autocomplete="family-name"
required
>
{% for error in form.last_name.errors %}
<p class="auth-field-error">{{ error }}</p>
{% endfor %}
</div>
<div class="auth-actions">
<button class="auth-submit" type="submit">Сохранить</button>
</div>
</form>
<form method="post" action="{% url 'users:logout' %}">
{% csrf_token %}
<div class="auth-actions">