Skip to content
Browse files

better prototyping and properties edition in forms.

  • Loading branch information...
1 parent 164fa1d commit 6c6a57f9d903c8c401dece242f30ae060ceee795 @pjedrzejewski pjedrzejewski committed May 16, 2012
View
9 src/Sylius/Sandbox/Bundle/AssortmentBundle/Resources/views/Backend/Product/create.html.twig
@@ -37,8 +37,13 @@
</div>
<div class="tab-pane" id="properties">
<div id="sylius-assortment-product-properties" data-prototype="{{ form_widget(form.properties.get('prototype'))|e }}">
- {% for propertyForm in form.properties %}
- {{ form_widget(propertyForm) }}
+ {% for property in product.properties %}
+ <span class="hide">{{ form_row(form.properties[loop.index0].property) }}</span>
+ {{ form_row(form.properties[loop.index0].value, {'label': property.name}) }}
+ {% else %}
+ {% for propertyForm in form.properties %}
+ {{ form_widget(propertyForm) }}
+ {% endfor %}
{% endfor %}
</div>
<div class="control-group">
View
9 src/Sylius/Sandbox/Bundle/AssortmentBundle/Resources/views/Backend/Product/update.html.twig
@@ -37,8 +37,13 @@
</div>
<div class="tab-pane" id="properties">
<div id="sylius-assortment-product-properties" data-prototype="{{ form_widget(form.properties.get('prototype'))|e }}">
- {% for propertyForm in form.properties %}
- {{ form_widget(propertyForm) }}
+ {% for property in product.properties %}
+ <span class="hide">{{ form_row(form.properties[loop.index0].property) }}</span>
+ {{ form_row(form.properties[loop.index0].value, {'label': property.name}) }}
+ {% else %}
+ {% for propertyForm in form.properties %}
+ {{ form_widget(propertyForm) }}
+ {% endfor %}
{% endfor %}
</div>
<div class="control-group">

0 comments on commit 6c6a57f

Please sign in to comment.
Something went wrong with that request. Please try again.