{% block form %} {{ sonata_block_render_event('sonata.admin.edit.form.top', { 'admin': admin, 'object': object }) }} {% set url = admin.id(object) is not null ? 'edit' : 'create' %} {% if not admin.hasRoute(url)%}
{{ "form_not_available"|trans({}, "SonataAdminBundle") }}
{% else %}
{% if form.vars.errors|length > 0 %}
{{ form_errors(form) }}
{% endif %} {% block sonata_pre_fieldsets %}
{% endblock %} {% block sonata_tab_content %}
{% for name, form_group in admin.formgroups %}
{% if form_group.description != false %}

{{ form_group.description|raw }}

{% endif %} {% for field_name in form_group.fields %} {% if admin.formfielddescriptions[field_name] is defined %} {{ form_row(form[field_name])}} {% endif %} {% endfor %}
{% endfor %}
{% endblock %} {% block sonata_post_fieldsets %}
{% endblock %} {{ form_rest(form) }} {% block formactions %}
{% if app.request.isxmlhttprequest %} {% if admin.id(object) is not null %} {% else %} {% endif %} {% else %} {% if admin.supportsPreviewMode %} {% endif %} {% if admin.id(object) is not null %} {% if admin.hasroute('list') %} {% endif %} {% if admin.hasroute('delete') and admin.isGranted('DELETE', object) %} {{ 'delete_or'|trans({}, 'SonataAdminBundle') }} {{ 'link_delete'|trans({}, 'SonataAdminBundle') }} {% endif %} {% if admin.isAclEnabled() and admin.hasroute('acl') and admin.isGranted('MASTER', object) %} {{ 'link_edit_acl'|trans({}, 'SonataAdminBundle') }} {% endif %} {% else %} {% if admin.hasroute('edit') %} {% endif %} {% if admin.hasroute('list') %} {% endif %} {% endif %} {% endif %}
{% endblock formactions %}
{% endif%} {{ sonata_block_render_event('sonata.admin.edit.form.bottom', { 'admin': admin, 'object': object }) }} {% endblock %}