Skip to content

Commit

Permalink
Merge pull request #37 from Runroom/hotfix/include-as-function
Browse files Browse the repository at this point in the history
Change to include function
  • Loading branch information
jordisala1991 committed Sep 6, 2021
2 parents aec1787 + 957a9a7 commit bf77bcc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
8 changes: 4 additions & 4 deletions src/Resources/views/Forms/contact-ajax.html.twig
Expand Up @@ -4,10 +4,10 @@
<div class="demo">
<section class="demp__section u-wrapper js-form-container">
<div class="js-form-display">
{% include '@RunroomSamples/Forms/components/contact-form.html.twig' with {
'class': 'js-validate form js-form-ajax',
'action': path('runroom_samples.forms.contact_ajax_post'),
} %}
{{ include('@RunroomSamples/Forms/components/contact-form.html.twig', {
class: 'js-validate form js-form-ajax',
action: path('runroom_samples.forms.contact_ajax_post'),
}) }}
</div>
<div class="form__ok js-form-success" style="display: none" aria-hidden="true">
<h2 class="t-h2">{{ 'form.messages.ok_title'|trans }}</h2>
Expand Down
10 changes: 4 additions & 6 deletions src/Resources/views/Forms/contact-hubspot.html.twig
Expand Up @@ -7,12 +7,10 @@
<h2 class="t-h2">{{ 'form.messages.ok_title'|trans }}</h2>
<p class="p-big">{{ 'form.messages.ok_description'|trans }}</p>
{% else %}
{% include '@RunroomSamples/Forms/components/contact-hubspot-form.html.twig' with {
'action': path(
app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')|merge({'_fragment': 'form'})
),
} %}
{{ include('@RunroomSamples/Forms/components/contact-hubspot-form.html.twig', {action: path(
app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')|merge({'_fragment': 'form'})
)}) }}
{% endif %}
</section>
</div>
Expand Down
10 changes: 4 additions & 6 deletions src/Resources/views/Forms/contact.html.twig
Expand Up @@ -7,12 +7,10 @@
<h2 class="t-h2">{{ 'form.messages.ok_title'|trans }}</h2>
<p class="p-big">{{ 'form.messages.ok_description'|trans }}</p>
{% else %}
{% include '@RunroomSamples/Forms/components/contact-form.html.twig' with {
'action': path(
app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')|merge({'_fragment': 'form'})
),
} %}
{{ include('@RunroomSamples/Forms/components/contact-form.html.twig', {action: path(
app.request.attributes.get('_route'),
app.request.attributes.get('_route_params')|merge({'_fragment': 'form'})
)}) }}
{% endif %}
</section>
</div>
Expand Down

0 comments on commit bf77bcc

Please sign in to comment.