$formBuilder->add('propertyOrganicLabel', ChoiceType::class, array( | $formBuilder->add('propertyOrganicLabel', ChoiceType::class, array( | ||||
'choices' => array( | 'choices' => array( | ||||
'field.ProductFamily.organicLabelOptions.' . ProductFamily::PROPERTY_ORGANIC_LABEL_AB => ProductFamily::PROPERTY_ORGANIC_LABEL_AB, | |||||
'field.ProductFamily.organicLabelOptions.' . ProductFamily::PROPERTY_ORGANIC_LABEL_NP => ProductFamily::PROPERTY_ORGANIC_LABEL_NP, | |||||
'field.ProductFamily.organicLabelOptions.' . ProductFamily::PROPERTY_ORGANIC_LABEL_HVE => ProductFamily::PROPERTY_ORGANIC_LABEL_HVE, | |||||
'field.ProductFamily.organicLabelOptions.' . ProductFamily::PROPERTY_ORGANIC_LABEL_TVVR => ProductFamily::PROPERTY_ORGANIC_LABEL_TVVR | |||||
'field.ProductFamily.organicLabelOptions.' . ProductFamily::QUALITY_LABEL_AB => ProductFamily::QUALITY_LABEL_AB, | |||||
'field.ProductFamily.organicLabelOptions.' . ProductFamily::QUALITY_LABEL_NP => ProductFamily::QUALITY_LABEL_NP, | |||||
'field.ProductFamily.organicLabelOptions.' . ProductFamily::QUALITY_LABEL_HVE => ProductFamily::QUALITY_LABEL_HVE, | |||||
'field.ProductFamily.organicLabelOptions.' . ProductFamily::QUALITY_LABEL_TVVR => ProductFamily::QUALITY_LABEL_TVVR | |||||
), | ), | ||||
'translation_domain' => 'lcshop', | 'translation_domain' => 'lcshop', | ||||
'multiple' => false, | 'multiple' => false, |
typeExpirationDate: null, | typeExpirationDate: null, | ||||
behaviorExpirationDate: null, | behaviorExpirationDate: null, | ||||
propertyAllergens: null, | propertyAllergens: null, | ||||
propertyOrganicLabelActive: false, | |||||
propertyQualityLabelActive: false, | |||||
propertyOrganicLabel: null, | propertyOrganicLabel: null, | ||||
propertyNoveltyExpirationDateActive: false, | propertyNoveltyExpirationDateActive: false, | ||||
propertyNoveltyExpirationDate:null, | propertyNoveltyExpirationDate:null, | ||||
this.propertyNoveltyExpirationDate = null; | this.propertyNoveltyExpirationDate = null; | ||||
} | } | ||||
}, | }, | ||||
propertyOrganicLabelActive: function () { | |||||
if(!this.propertyOrganicLabelActive){ | |||||
propertyQualityLabelActive: function () { | |||||
if(!this.propertyQualityLabelActive){ | |||||
this.propertyOrganicLabel = null; | this.propertyOrganicLabel = null; | ||||
$(this.$refs['propertyOrganicLabel']).val('').trigger('change'); | $(this.$refs['propertyOrganicLabel']).val('').trigger('change'); | ||||
} | } |
differentSupplierTaxRate: TVA différente pour le producteur | differentSupplierTaxRate: TVA différente pour le producteur | ||||
supplierTaxRate: TVA du producteur | supplierTaxRate: TVA du producteur | ||||
propertyNoveltyExpirationDateActive: Marquer le produit comme "nouveauté" jusqu'au | propertyNoveltyExpirationDateActive: Marquer le produit comme "nouveauté" jusqu'au | ||||
propertyOrganicLabelActive: Marquer le produit comme "labellisé" | |||||
propertyQualityLabelActive: Marquer le produit comme "labellisé" | |||||
propertyLargeVolume: Marquer le produit comme "gros volume" | propertyLargeVolume: Marquer le produit comme "gros volume" | ||||
propertyCharacteristics: Caractéristiques | propertyCharacteristics: Caractéristiques | ||||
propertyPackaging: Conditionnement | propertyPackaging: Conditionnement |
{% if form.behaviorStockWeek.vars.value %}behaviorStockWeek: "{{ form.behaviorStockWeek.vars.value }}",{% endif %} | {% if form.behaviorStockWeek.vars.value %}behaviorStockWeek: "{{ form.behaviorStockWeek.vars.value }}",{% endif %} | ||||
{% if formValues.availableQuantity %}availableQuantity: "{{ formValues.availableQuantity }}",{% endif %} | {% if formValues.availableQuantity %}availableQuantity: "{{ formValues.availableQuantity }}",{% endif %} | ||||
{% if formValues.availableQuantityDefault %}availableQuantityDefault: "{{ formValues.availableQuantityDefault }}",{% endif %} | {% if formValues.availableQuantityDefault %}availableQuantityDefault: "{{ formValues.availableQuantityDefault }}",{% endif %} | ||||
{% if formValues.propertyOrganicLabel %}propertyOrganicLabelActive: true,{% endif %} | |||||
{% if formValues.propertyOrganicLabel %}propertyOrganicLabel: "{{ formValues.propertyOrganicLabel }}",{% endif %} | |||||
{% if formValues.qualityLabels %}propertyQualityLabelActive: true,{% endif %} | |||||
{% if formValues.qualityLabels %}qualityLabels: "",{% endif %} | |||||
{% if formValues.propertyNoveltyExpirationDate %}propertyNoveltyExpirationDateActive: true,{% endif %} | {% if formValues.propertyNoveltyExpirationDate %}propertyNoveltyExpirationDateActive: true,{% endif %} | ||||
{% if formValues.propertyNoveltyExpirationDate %}propertyNoveltyExpirationDate: "{{ formValues.propertyNoveltyExpirationDate|date('Y-m-d') }}",{% endif %} | {% if formValues.propertyNoveltyExpirationDate %}propertyNoveltyExpirationDate: "{{ formValues.propertyNoveltyExpirationDate|date('Y-m-d') }}",{% endif %} |
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td>{{ form_widget(form.propertyOrganicLabelActive, {"attr" : {'v-model' : 'propertyOrganicLabelActive' } }) }}</td> | |||||
{% do form.propertyOrganicLabel.setRendered %} | |||||
<td>{{ form_widget(form.propertyQualityLabelActive, {"attr" : {'v-model' : 'propertyQualityLabelActive' } }) }}</td> | |||||
<td> | <td> | ||||
<div class="form-widget" v-show="propertyOrganicLabelActive == true"> | |||||
{{ form_widget(form.propertyOrganicLabel, {"attr" : {'v-model' : 'propertyOrganicLabel', 'ref': 'propertyOrganicLabel'}}) }} | |||||
<div class="form-widget" v-show="propertyQualityLabelActive == true"> | |||||
{{ form_widget(form.qualityLabels) }} | |||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> |