Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yobud/5509553 to your computer and use it in GitHub Desktop.
Save yobud/5509553 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
- block prototype
- if prototype is defined
- include 'IfgmSTVBundle:Category:_translationPrototype.html.haml'
- block collection_rows
- spaceless
= form_errors(form)
<div #{ block('widget_container_attributes') } >
- for prototype in form
= form_errors(prototype)
- include 'IfgmSTVBundle:Category:_translationPrototype.html.haml'
%span.button.add-collection-item
Add
</div>
= form_rest(form)
%div
- for field in prototype
= form_row(field)
%span.button.danger.remove-collection-item
Remove
- form_theme form "IfgmSTVBundle:Category:_translationCollectionTemplate.html.haml"
%form{: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'}
= form_errors(form)
= form_widget(form)
%div
%button{:type => 'submit'}
= 'send'|trans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment