[wip] re-introduce 'add element' functionality

This commit is contained in:
Julien Fastré 2015-11-25 21:26:30 +01:00
parent b96076022f
commit f24a088a0d

View File

@ -35,15 +35,20 @@
{# CFChoice : render the different elements in a choice list #}
{% block cf_choices_row %}
<h3>{{ 'Choices'|trans }}</h3>
{{ dump(form.vars.prototype.children) }}
<div id="{{ form.vars.id }}" data-prototype="{{- form_row(form.vars.prototype.children.name)
~ form_row(form.vars.prototype.children.active)
~ form_row(form.vars.prototype.children.slug) |e -}}">
<table><tbody>
{% for choice in form %}
<tr><td>
{{ form_row(choice.name) }}
{{ form_row(choice.active) }}
{{ form_row(choice.slug) }}
</td></tr>
{% endfor %}
</tbody></table>
</div>
{# we use javascrit to add an additional element. All functions are personnalized with the id ( = form.vars.id) #}