mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Fix form without live component
This commit is contained in:
parent
0aaca6dfc9
commit
b71cc099ce
1 changed files with 6 additions and 2 deletions
|
|
@ -1,11 +1,15 @@
|
|||
{% if form is not defined %}
|
||||
{% set form = hookable_metadata.context.form %}
|
||||
{% endif %}
|
||||
|
||||
{% form_theme form '@SyliusAdmin/shared/form_theme.html.twig' %}
|
||||
|
||||
<div class="container-xl" {{ attributes }}>
|
||||
<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 is not null %}
|
||||
{% elseif form.vars.data.id|default(null) is not null %}
|
||||
<input type="hidden" name="_method" value="PUT"/>
|
||||
{% endif %}
|
||||
{{ form_errors(form) }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue