Skip to content

Instantly share code, notes, and snippets.

@yobud
Last active December 16, 2015 22:49
Show Gist options
  • Save yobud/5509686 to your computer and use it in GitHub Desktop.
Save yobud/5509686 to your computer and use it in GitHub Desktop.
{% block collection_widget %}
{% set attr = attr|merge({'data-prototype': block('prototype')|trim }) %}
{{ block('collection_rows')|replace({'\n':''})|raw }}
{% endblock %}
{% block prototype %}
{% if prototype is defined %}
{% include 'IfgmSTVBundle:Category:_translationPrototype.html.twig' %}
{% endif %}
{% endblock %}
{% line 9 %}{% block collection_rows %}
{% spaceless %}
{{ form_errors(form) }}
<div {{ block('widget_container_attributes') }} >
{% for prototype in form %}
{{ form_errors(prototype) }}
{% include 'IfgmSTVBundle:Category:_translationPrototype.html.twig' %}
{% endfor %}
<span class="button add-collection-item">
Add
</span>
</div>
{% line 19 %}{{ form_rest(form) }}
{% endspaceless %}
{% endblock %}
<div>
{% for field in prototype %}
{{ form_row(field) }}
{% endfor %}
<span class="button danger remove-collection-item">
Remove
</span>
</div>
{% form_theme form "IfgmSTVBundle:Category:_translationCollectionTemplate.html.twig" %}
<form {% line 3 %}{{ mthaml_attributes([['method', ('post')], ['action', (path(form.vars.value.id ? 'ifgm_stv_category_admin_edit' : 'ifgm_stv_category_admin_new', {id: form.vars.value.id}))], ['class', ('custom')]], 'html5', 'UTF-8')|raw }}>
{{ form_errors(form) }}
{{ form_widget(form) }}
<div>
<button {% line 8 %}{{ mthaml_attributes([['type', ('submit')]], 'html5', 'UTF-8')|raw }}>
{{ 'send'|trans }}
</button>
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment