{% set form_id = form_id ? form_id : 'blueprints' %}
{% set scope = scope ?: 'data.' %}

<form {% if form_action %}action="{{ form_action }}"{% endif %} id="{{ form_id }}" method="post" data-grav-form="{{ form_id }}" {% if form.novalidate %}novalidate{% endif %} data-grav-keepalive="true">
    {% for field in blueprints.fields %}
        {% if field.type %}
            {% set value = field.name ? (form.value(field.name) ?? data.value(field.name)) : data.toArray %}
            <div class="block block-{{field.type}}">
                {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
            </div>
        {% endif %}
    {% endfor %}

    <input type="hidden" name="task" value="continue" />
    <div class="button-bar">
        <button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> Cancel</button>
        <button class="button success">{{ "PLUGIN_ADMIN.CONTINUE"|tu }}</button>
    </div>

    {{ nonce_field('admin-form', 'admin-nonce')|raw }}

</form>
