feat: Add SKU field to ProductKit form for kit creation
- Added 'sku' field to ProductKitForm meta fields list - Added SKU label in form labels - Added SKU widget styling in __init__ method with helpful placeholder - Updated productkit_form.html template to display SKU field after name, before description - Updated form field filtering to exclude 'sku' from dynamic loop to prevent duplication 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -140,6 +140,18 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Артикул -->
|
||||
<div class="mb-3">
|
||||
{{ form.sku.label_tag }}
|
||||
{{ form.sku }}
|
||||
{% if form.sku.help_text %}
|
||||
<small class="form-text text-muted">{{ form.sku.help_text }}</small>
|
||||
{% endif %}
|
||||
{% if form.sku.errors %}
|
||||
<div class="text-danger">{{ form.sku.errors }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Категория -->
|
||||
<div class="mb-3">
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
@@ -175,7 +187,7 @@
|
||||
</div>
|
||||
|
||||
{% for field in form %}
|
||||
{% if field.name not in 'name,categories,description,tags' %}
|
||||
{% if field.name not in 'name,sku,categories,description,tags' %}
|
||||
{% if field.name == 'fixed_price' %}
|
||||
<!-- Alert для неактивного поля fixed_price -->
|
||||
<div id="fixed-price-alert" class="alert alert-warning d-none mb-3" role="alert">
|
||||
|
||||
Reference in New Issue
Block a user