Skip to content

Commit

Permalink
Allow chosen field to be called within a form collection
Browse files Browse the repository at this point in the history
  • Loading branch information
Schyzophrenic committed Mar 19, 2012
1 parent 8f733e7 commit 781bd18
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Resources/views/Form/div_layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,20 @@
"class": (attr.class | default('') ~ " chzn-select")
}) %}
{{ block("choice_widget") }}
<script type="text/javascript">
genemuFormBundleChosenFunc_{{ id }} = {% spaceless %}{{ json_transform_func | raw }}{% endspaceless %}
genemuFormBundleChosenConfigs_{{ id }}=new Array();
genemuFormBundleChosenConfigs_{{ id }}['empty_value']='{{ empty_value }}';
genemuFormBundleChosenConfigs_{{ id }}['allow_single_deselect']={{ allow_single_deselect ? 'true' : 'false' }};
{% if route_name %}
genemuFormBundleChosenConfigs_{{ id }}['path_route_name']='{{ path(route_name) }}';
{% endif %}
genemuFormBundleChosenConfigs_{{ id }}['json_transform_func']=genemuFormBundleChosenFunc_{{ id }};
genemuFormBundleChosenConfigs_{{ id }}['typing_timeout']='{{ typing_timeout }}';
genemuFormBundleChosenConfigs_{{ id }}['query_param_name']='{{ query_param_name }}';
</script>
{% endspaceless %}
{% endblock genemu_jquerychosen_widget %}

Expand Down

0 comments on commit 781bd18

Please sign in to comment.