Skip to content

Commit

Permalink
Merge pull request #296 from loic425/fix/crud-templates-when-no-form-…
Browse files Browse the repository at this point in the history
…templates

[HotFix] CRUD templates when there are no form templates configured
  • Loading branch information
loic425 committed Jan 20, 2021
2 parents 28a5723 + bcb3678 commit 21f15e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
{{ form_start(form, {'action': path(configuration.vars.route.name|default(configuration.getRouteName('create')), configuration.vars.route.parameters|default({})), 'attr': {'class': 'ui loadable form', 'novalidate': 'novalidate'}}) }}
{% if configuration.vars.templates.form is defined %}
{% include configuration.vars.templates.form %}
{{ form_row(form._token) }}
{% else %}
{{ form_widget(form) }}
{% endif %}

{% include '@SyliusUi/Form/Buttons/_create.html.twig' with {'paths': {'cancel': path(configuration.getRouteName('index'), configuration.vars.route.parameters|default({}))}} %}

{{ form_row(form._token) }}
{{ form_end(form, {'render_rest': false}) }}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<input type="hidden" name="_method" value="PUT" />
{% if configuration.vars.templates.form is defined %}
{% include configuration.vars.templates.form %}
{{ form_row(form._token) }}
{% else %}
{{ form_widget(form) }}
{% endif %}
{% include '@SyliusUi/Form/Buttons/_update.html.twig' with {'paths': {'cancel': path(configuration.getRouteName('index'), configuration.vars.route.parameters|default({}))}} %}
{{ form_row(form._token) }}
{{ form_end(form, {'render_rest': false}) }}
</div>

0 comments on commit 21f15e9

Please sign in to comment.