{# templates/inventory/add_category.html #} {% extends 'core/base.html' %} {% load static %} {% block title %}Add Category - SwiftPOS{% endblock %} {% block topbar_title %} Add Category {% endblock %} {% block content %}
{% if messages %} {% for message in messages %}
{% if message.tags == 'success' %} {% elif message.tags == 'error' or message.tags == 'danger' %} {% elif message.tags == 'warning' %} {% else %} {% endif %}
{{ message }}
{% endfor %} {% endif %}
{# Non-field form errors #} {% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %}
Add New Category
Organise products into groups like "Snacks", "Drinks", or "Clothes".
Categories
{% csrf_token %}
{# Render every field from ProductCategoryForm #} {% for field in form %}
{{ field }} {% if field.help_text %}
{{ field.help_text }}
{% endif %} {% for error in field.errors %}
{{ error }}
{% endfor %}
{% endfor %}
Cancel
{% endblock %}