{% extends "base.html" %} {% block title %}تعديل {{ model_name }}{% endblock %} {% block content %}

تعديل {{ item.name if item.name else (item.caption if item.caption else model_name) }}

{{ form.hidden_tag() }} {% if form.name %}
{{ form.name.label(class="form-label") }} {{ form.name(class="form-control", value=item.name) }}
{% endif %} {% if form.caption %}
{{ form.caption.label(class="form-label") }} {{ form.caption(class="form-control", value=item.caption) }}
{% endif %} {% if form.description %}
{{ form.description.label(class="form-label") }} {{ form.description(class="form-control", rows=3, value=item.description) }}
{% endif %} {% if form.brand_id %}
{{ form.brand_id.label(class="form-label") }}
{% endif %} {% if form.image %}
{{ form.image.label(class="form-label") }} {{ form.image(class="form-control") }} {% if item.filename or item.image %}

اترك فارغًا للحفاظ على الصورة الحالية

{% endif %}
{% endif %} {% if form.logo %}
{{ form.logo.label(class="form-label") }} {{ form.logo(class="form-control") }} {% if item.logo %}

اترك فارغًا للحفاظ على الشعار الحالي

{% endif %}
{% endif %} {% if form.active %}
{{ form.active.label(class="form-check-label") }} {{ form.active(class="form-check-input", checked=item.active) }}
{% endif %} {{ form.submit(class="btn btn-warning") }} إلغاء
{% endblock %}