{% extends "layout.html" %} {% block title %} {% if record_id %}Edit {{ resource.label }}{% else %}New {{ resource.label }}{% endif %} — {{ panel_title }} {% endblock %} {% block breadcrumb %} {% endblock %} {% block page_heading %}

{% if record_id %}Edit {{ resource.label }}{% else %}New {{ resource.label }}{% endif %}

{% endblock %} {% block header_actions %} {% if record_id %} {% if resource.can_view and has_perm(resource.slug + ':view') %} View {% endif %} {% for action in resource.form_actions %} {% if action.placement == 'header' and has_perm(resource.slug + ':action') %} {% endif %} {% endfor %} {% endif %} {% endblock %} {% block content %}
{% if errors and errors.__all__ %}
{{ errors.__all__ }}
{% endif %}
{% if resource.form_fields %} {%- set _fields = resource.form_fields %} {%- set _form_cols = resource.form_cols %} {% include "partials/form_grid.html" %} {% else %}

No form fields defined. Add form_fields to your Resource class.

{% endif %}
Cancel
{# Inline form actions #} {% if record_id %} {% for action in resource.form_actions %} {% if action.placement == 'inline' %} {% endif %} {% endfor %} {% endif %} {# Save buttons #} {% if record_id %} {% endif %}
{% endblock %}