Переглянути джерело

Merge branch 'develop'

master^2
Guillaume 3 роки тому
джерело
коміт
cea86bf0a4
6 змінених файлів з 780 додано та 759 видалено
  1. +4
    -4
      ShopBundle/Controller/Backend/ProductFamilyController.php
  2. +766
    -746
      ShopBundle/Model/ProductFamily.php
  3. +3
    -3
      ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js
  4. +1
    -1
      ShopBundle/Resources/translations/lcshop.fr.yaml
  5. +2
    -2
      ShopBundle/Resources/views/backend/productfamily/form.html.twig
  6. +4
    -3
      ShopBundle/Resources/views/backend/productfamily/panel_property.html.twig

+ 4
- 4
ShopBundle/Controller/Backend/ProductFamilyController.php Переглянути файл

@@ -140,10 +140,10 @@ class ProductFamilyController extends AdminController

$formBuilder->add('propertyOrganicLabel', ChoiceType::class, 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',
'multiple' => false,

+ 766
- 746
ShopBundle/Model/ProductFamily.php
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 3
- 3
ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js Переглянути файл

@@ -430,7 +430,7 @@ $(window).on('load', function () {
typeExpirationDate: null,
behaviorExpirationDate: null,
propertyAllergens: null,
propertyOrganicLabelActive: false,
propertyQualityLabelActive: false,
propertyOrganicLabel: null,
propertyNoveltyExpirationDateActive: false,
propertyNoveltyExpirationDate:null,
@@ -614,8 +614,8 @@ $(window).on('load', function () {
this.propertyNoveltyExpirationDate = null;
}
},
propertyOrganicLabelActive: function () {
if(!this.propertyOrganicLabelActive){
propertyQualityLabelActive: function () {
if(!this.propertyQualityLabelActive){
this.propertyOrganicLabel = null;
$(this.$refs['propertyOrganicLabel']).val('').trigger('change');
}

+ 1
- 1
ShopBundle/Resources/translations/lcshop.fr.yaml Переглянути файл

@@ -351,7 +351,7 @@ field:
differentSupplierTaxRate: TVA différente pour le producteur
supplierTaxRate: TVA du producteur
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"
propertyCharacteristics: Caractéristiques
propertyPackaging: Conditionnement

+ 2
- 2
ShopBundle/Resources/views/backend/productfamily/form.html.twig Переглянути файл

@@ -36,8 +36,8 @@
{% if form.behaviorStockWeek.vars.value %}behaviorStockWeek: "{{ form.behaviorStockWeek.vars.value }}",{% endif %}
{% if formValues.availableQuantity %}availableQuantity: "{{ formValues.availableQuantity }}",{% 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 %}propertyNoveltyExpirationDate: "{{ formValues.propertyNoveltyExpirationDate|date('Y-m-d') }}",{% endif %}

+ 4
- 3
ShopBundle/Resources/views/backend/productfamily/panel_property.html.twig Переглянути файл

@@ -22,10 +22,11 @@
</td>
</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>
<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>
</td>
</tr>

Завантаження…
Відмінити
Зберегти