{% raw %}{% extends "base.html" %}

{% block title %}{% endraw %}Update {{ entity_name|title }}{% raw %}{% endblock %}

{% block content %}
<div class="container mt-5">
    <h1>Update {% endraw %}{{ entity_name|title }}{% raw %}</h1>
    
    {{ form_start(form, {'action': url_for('{% endraw %}{{ entity_name }}{% raw %}.update', id=item.id)}) }}
        {% endraw %}
        {%- for prop in properties %}
        {%- if prop.name != 'id' %}
        {% raw %}{{ form_row(form, '{% endraw %}{{ prop.name }}{% raw %}') }}{% endraw %}
        {% endif %}
        {%- endfor %}
        {% raw %}
        <div class="mt-4">
            <button type="submit" class="btn btn-primary">Update</button>
            <a href="{{ url_for('{% endraw %}{{ entity_name }}{% raw %}.read_all') }}" class="btn btn-secondary ms-2">Cancel</a>
        </div>
    {{ form_end(form) }}
</div>
{% endblock %}{% endraw %}