Selaa lähdekoodia

Correctif backoffice

reduction
Fab 4 vuotta sitten
vanhempi
commit
084b8c814a
9 muutettua tiedostoa jossa 45 lisäystä ja 17 poistoa
  1. +3
    -1
      ShopBundle/Controller/Admin/ProductFamilyController.php
  2. +4
    -0
      ShopBundle/Form/ProductFamilyCategoriesType.php
  3. +1
    -1
      ShopBundle/Repository/ProductCategoryRepository.php
  4. +5
    -0
      ShopBundle/Resources/public/css/backend/custom.css
  5. +6
    -3
      ShopBundle/Resources/public/js/backend/script/default/init-common.js
  6. +5
    -2
      ShopBundle/Resources/translations/lcshop.fr.yaml
  7. +1
    -1
      ShopBundle/Resources/views/backend/default/layout.html.twig
  8. +9
    -7
      ShopBundle/Resources/views/backend/productfamily/panel_general.html.twig
  9. +11
    -2
      ShopBundle/Resources/views/backend/productfamily/panel_price.html.twig

+ 3
- 1
ShopBundle/Controller/Admin/ProductFamilyController.php Näytä tiedosto

@@ -46,7 +46,9 @@ class ProductFamilyController extends AdminController

$formBuilder->add('warningMessageType', ChoiceType::class, array(
'choices' => array(
'field.default.warningMessageTypeOptions.alert' => 'alert',
'field.default.warningMessageTypeOptions.success' => 'success',
'field.default.warningMessageTypeOptions.error' => 'error',
'field.default.warningMessageTypeOptions.warning' => 'warning',
'field.default.warningMessageTypeOptions.info' => 'info'
),
'translation_domain' => 'lcshop',

+ 4
- 0
ShopBundle/Form/ProductFamilyCategoriesType.php Näytä tiedosto

@@ -37,6 +37,10 @@ class ProductFamilyCategoriesType extends AbstractType
'label' => $category->getTitle(),
'data' => $currentProductCategories->contains($category),
'required' => false,
'disabled'=>true,
'attr'=>[
'class'=>'none'
]
]);
foreach ($category->getChildrens() as $children) {
$builder->add('category_children_' . $children->getId(), CheckboxType::class, [

+ 1
- 1
ShopBundle/Repository/ProductCategoryRepository.php Näytä tiedosto

@@ -32,7 +32,7 @@ class ProductCategoryRepository extends BaseRepository implements DefaultReposit
{
return $this->findByMerchantQuery()
->andWhere('e.parent is NULL')
->andWhere('e.status >= 0')
->andWhere('e.status = 1')
->orderBy('e.position', 'ASC')
->getQuery()
->getResult();

+ 5
- 0
ShopBundle/Resources/public/css/backend/custom.css Näytä tiedosto

@@ -33,6 +33,7 @@ td.actions{white-space: nowrap; text-align: right;}
.form-check{padding-left: 0px;}

.form-sent .form-check-label input:invalid ~ .checkmark { border-color: #dc3545;}
.form-check-label input:disabled ~ .checkmark {display: none}
.form-check-label input ~ .checkmark { position: absolute; top: 0; left: 0; height: 18px; width: 18px; background-color: #eee;border: 1px solid var(--primary);}
.form-check-label.big input ~ .checkmark { height: 21px; width: 21px; }
.form-check-label input[type="checkbox"] ~ .checkmark {top: 2px;}
@@ -53,6 +54,10 @@ td.actions{white-space: nowrap; text-align: right;}
/* Create a custom radio button */


.product-categories .parent .form-group.field-checkbox .form-check-label{padding-left: 0px; font-style: italic;}
.product-categories .children .form-group.field-checkbox{margin-left: 20px}
.product-categories .form-group{margin-bottom: 0.5rem;}


/* Général */
.btn.btn-primary.action-save{float: right;}

+ 6
- 3
ShopBundle/Resources/public/js/backend/script/default/init-common.js Näytä tiedosto

@@ -11,8 +11,8 @@ function initLcNoty() {


function custom_switch_merchants() {
$('#switch-merchant select').change(function () {
$('#switch-merchant form').submit();
$('#switch-merchant').on('change',function () {
$('#switch-merchant').parents('form').submit();
});
}

@@ -79,10 +79,13 @@ function setSelect2($select) {
var options = {
width: "100%",
dropdownAutoWidth: false,
allowClear: false,
allowClear: true,
minimumResultsForSearch: 8
};

if ($select.data('allow-clear') == 'false') {
options.allowClear= false;
}
if ($select.data('width')) {
options.width = 'auto'
}

+ 5
- 2
ShopBundle/Resources/translations/lcshop.fr.yaml Näytä tiedosto

@@ -89,11 +89,14 @@ field:
note: Note interne
warningMessageType: Type de message d'avertissement
warningMessageTypeOptions:
alert: Alerte
info: Information
warning: Attention (jaune)
info: Information (bleu)
error: Erreur (rouge)
success: Succès (vert)
warningMessage: Contenu du message d'avertissement

ProductFamily:
taxRateInherited: Utiliser la TVA par défaut
activeProducts: Activer les déclinaisons
productsType: Type de déclinaisons
productsTypeHelp: 'Volume / Pods / Varieté / Parfum ...'

+ 1
- 1
ShopBundle/Resources/views/backend/default/layout.html.twig Näytä tiedosto

@@ -105,7 +105,7 @@
<label for="switch-merchant"><i
class="fa fa-store"></i> {{ 'action.switchMerchant'|trans() }} :
</label>
<select id="switch-merchant" class="select2" data-width="auto" name="id_merchant">
<select id="switch-merchant" data-allow-clear="false" data-width="auto" class="select2" name="id_merchant">
{% for merchant in merchants %}
<option value="{{ merchant.id }}"
{% if current_merchant and current_merchant.id == merchant.id %}selected="selected"{% endif %}>

+ 9
- 7
ShopBundle/Resources/views/backend/productfamily/panel_general.html.twig Näytä tiedosto

@@ -40,17 +40,19 @@
{{ macros.endCard(true) }}
{{ macros.startCard(0, 'ProductFamily.categories','light') }}

<div class="col-12">
<div class="col-12 product-categories">
{% for category in categories %}
{% set child = 'category_' ~ category.id %}
<div class="parent">
{{ form_row(attribute(form.productCategories, child)) }}
</div>
{% for children in category.childrens %}
<div class="children">
{% set child = 'category_children_' ~ children.id %}
{{ form_row(attribute(form.productCategories, child), {attrs: {class: 'test'}}) }}
</div>
{% endfor %}

{% for children in category.childrens %}
<div class="children">
{% set child = 'category_children_' ~ children.id %}
{{ form_row(attribute(form.productCategories, child), {attrs: {class: 'test'}}) }}
</div>
{% endfor %}
{% endfor %}
</div>
{{ macros.endCard() }}

+ 11
- 2
ShopBundle/Resources/views/backend/productfamily/panel_price.html.twig Näytä tiedosto

@@ -68,8 +68,17 @@
</div>
<div class="form-group field-price col-12">
<div class="row">
<div class="col-10 align-content-center">
{{ form_row(form.multiplyingFactor, {'attr': {'v-model':'multiplyingFactor', '@change' : 'updateMultiplyingFactor'}}) }}
<div class="col-6 align-content-center">
<div class="form-widget">
{{ form_label(form.multiplyingFactor) }}
<div class="input-group">
{{ form_widget(form.multiplyingFactor, {'attr': {'v-model':'multiplyingFactor', '@change' : 'updateMultiplyingFactor'}}) }}
<div class="input-group-append">
<span class="input-group-text">X</span>
</div>
</div>
</div>

</div>
</div>
</div>

Loading…
Peruuta
Tallenna