Skip to content

Instantly share code, notes, and snippets.

@j
Created August 1, 2011 20:46
Show Gist options
  • Save j/1118957 to your computer and use it in GitHub Desktop.
Save j/1118957 to your computer and use it in GitHub Desktop.
{% block _advanced_parameters_row %}
{% spaceless %}
<div class="collection">
<label>Parameters</label>
<div style="float: left; clear: none">
{% for name, child in form %}
{% if name is not sameas('$$name$$') %}
<div class="collection_item">
<span class="field">{{ form_widget(child.field) }}</span>
<span class="type">{{ form_widget(child.parameter) }}</span>
<span class="values">{{ form_widget(child.value) }}</span>
<div style="float: left; clear: none; margin-left: 5px; margin-top: 6px;" class="remove">
<a href="#" title="Remove">Remove</a>
</div>
</div>
{% else %}
<script id="collection_prototype" type="text/html">
<div class="collection_item">
<span class="field">{{ form_widget(child.field) }}</span>
<span class="type">{{ form_widget(child.parameter) }}</span>
<span class="values">{{ form_widget(child.value) }}</span>
<div style="float: left; clear: none; margin-left: 5px; margin-top: 6px;" class="remove">
<a href="#" title="Remove">Remove</a>
</div>
</div>
</script>
{% endif %}
{% endfor %}
<div class="add">
<a style="float: right;" href="#" title="Add">Add</a>
</div>
</div>
</div>
{% endspaceless %}
{% endblock _advanced_parameters_row %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment