wiki-grav/plugins/admin/themes/grav/templates/partials/blueprints-raw.html.twig

23 lines
1.0 KiB
Twig
Raw Permalink Normal View History

{% set form_id = form_id ? form_id : 'blueprints' %}
{% set scope = scope ?: 'data.' %}
{% set field_layout = 'admin' %}
{% if admin.findFormFields('file', blueprints.fields) %}
{% set multipart = ' enctype="multipart/form-data"' %}
{% endif %}
<form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" data-grav-keepalive="true"{{ multipart|raw }}>
{% embed 'forms/default/fields.html.twig' with {name: null, fields: blueprints.fields} %}
{% block inner_markup_field_open %}<div class="block block-{{ field.type }}">{% endblock %}
{% block inner_markup_field_close %}</div>{% endblock %}
{% endembed %}
{% if form %}
{% include "forms/fields/formname/formname.html.twig" %}
{% include 'forms/fields/uniqueid/uniqueid.html.twig' %}
{{ nonce_field(form.getNonceAction(), form.getNonceName())|raw }}
{% else %}
{{ nonce_field('admin-form', 'admin-nonce')|raw }}
{% endif %}
</form>