{% extends "structure/base.html" %} {% from 'themes/whitelabel/crud/_macros.html' import render_field, render_form_errors %} {% block content %}
{% if tab_actions %}
{% if edit_actions %}
{% for action in edit_actions %} {{ icon(action.icon, style="font-size: 14px;") }} {{ construct.t(action.name) }} {% endfor %}
{% endif %}
{{ csrf_field() }} {{ render_form_errors(construct, errors) }} {% for field, type in fields %} {{ render_field(construct, field, type, view, data, ds, errors=errors) }} {% endfor %}
{{ icon("cancel", style="font-size: 14px;") }} {{ construct.t("crud-cancel-button") }}
{% else %}
{{ icon("back") }}

{{ construct.t('crud-edit-rec',{'recname': construct.t(view.name, {'count': 1}) }) }}

{% if edit_actions %}
{% for action in edit_actions %} {{ icon(action.icon) }} {% endfor %}
{% endif %}
{{ csrf_field() }} {% block form_body %} {{ render_form_errors(construct, errors) }}
{% for field, type in fields %} {{ render_field(construct, field, type, view, data, ds, errors=errors) }} {% endfor %}
{% endblock %}
{% endif %}
{% block form_scripts %}{{ form_scripts | default('') | safe }}{% endblock %} {% endblock %}