templates/product/feature/_featureSelects.html.twig line 1

Open in your IDE?
  1. <div class="productFeature eventNeedToBeAdded">
  2.     <div class="input_group input_group--vertical">
  3.         <label for="productFeature__feature{{nbSelect}}">{{'page.product.features.Feature'|trans}}</label>
  4.         <select id="productFeature__feature{{nbSelect}}" class="customTomSelect productFeature__feature" name="features[{{nbSelect}}][feature]">
  5.             <option value="0"> {{'page.product.features.ChooseFeature'|trans}} </option> 
  6.             {% for feature in features %}
  7.                 {% if feature.featureValues|length > 0 %}
  8.                     <option data-url-get-value="{{url('app_feature_value',{'id':feature.id})}}" value="{{feature.id}}" {% if exist == true and feature == productFeatureValue.feature %}selected{% endif %}>
  9.                     {% for featureLang in feature.featureLang %}
  10.                         {% if featureLang.lang == userInterfaceLang %}
  11.                             {{featureLang.name}}
  12.                         {% endif %}
  13.                     {% endfor %}
  14.                     </option>
  15.                 {% endif %}
  16.             {% endfor %}
  17.         </select>
  18.     </div>
  19.     {% if exist == false %}
  20.         <div class="input_group input_group--vertical">
  21.             <label for="productFeature__featureValue{{nbSelect}}">{{'page.product.features.FeatureValue'|trans}}</label>
  22.             <select class="customTomSelect productFeature__featureValue" id="productFeature__featureValue{{nbSelect}}" name="features[{{nbSelect}}][value]">
  23.                 <option> {{'page.product.features.ChooseFeatureValue'|trans}} </option> 
  24.             </select>
  25.         </div>
  26.     {% else %}
  27.         <div class="input_group input_group--vertical">
  28.             <label for="productFeature__featureValue{{nbSelect}}">{{'page.product.features.FeatureValue'|trans}}</label>
  29.             <select class="customTomSelect productFeature__featureValue" id="productFeature__featureValue{{nbSelect}}" name="features[{{nbSelect}}][value]">
  30.                 {% for featureValue in productFeatureValue.feature.featureValues %}
  31.                     <option value="{{featureValue.id}}" {% if featureValue == productFeatureValue %}selected{% endif %}>
  32.                     {% for featureValueLang in featureValue.featureValueLangs %}
  33.                         {% if featureValueLang.lang == userInterfaceLang %}
  34.                             {{featureValue.id}} {{featureValueLang.value}}
  35.                         {% endif %}
  36.                     {% endfor %}
  37.                     </option>
  38.                 {% endfor %}
  39.             </select>
  40.         </div>
  41.     {% endif %}
  42.     <div class="productFeature__remove">
  43.         {% include "svg/trash.svg" %}
  44.     </div>
  45. </div>