forked from Sylius/Stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathform.html.twig
More file actions
27 lines (23 loc) · 1.13 KB
/
form.html.twig
File metadata and controls
27 lines (23 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{% if form is not defined %}
{% set form = hookable_metadata.context.form|default(null) %}
{% endif %}
{% if resource is not defined %}
{% set resource = hookable_metadata.context.resource|default(null) %}
{% endif %}
{% if form is not null %}
{% form_theme form '@SyliusBootstrapAdminUi/shared/form_theme.html.twig' %}
<div class="container-xl" {% if attributes is defined %} {{ attributes }} {% endif %}>
{{ form_start(form, {'attr': {'novalidate': 'novalidate', 'id': form.vars.id}}) }}
<div class="card-body">
{% if hookable_metadata.configuration.method is defined %}
<input type="hidden" name="_method" value="{{ hookable_metadata.configuration.method }}"/>
{% elseif form.vars.data.id|default(null) is not null %}
<input type="hidden" name="_method" value="PUT"/>
{% endif %}
{{ form_errors(form) }}
{{ form_widget(form._token) }}
{% hook 'form' with { form, resource } %}
</div>
{{ form_end(form, {render_rest: hookable_metadata.configuration.render_rest|default(false)}) }}
</div>
{% endif %}