$this->utils->addFlash('success', 'Produit sauvegardé'); | $this->utils->addFlash('success', 'Produit sauvegardé'); | ||||
if($editForm->get('stayOnPage')->getData() || $this->request->get('submitAndStay')){ | |||||
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $id]) ; | |||||
if($editForm->get('stayOnPage')->getData()!="false" || $this->request->get('submitAndStay')!==null){ | |||||
$refererUrl = $this->request->query->get('referer', ''); | |||||
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $id, 'referer' => $refererUrl]) ; | |||||
}else { | }else { | ||||
return $this->redirectToReferrer(); | return $this->redirectToReferrer(); | ||||
} | } | ||||
$this->executeDynamicMethod('persist<EntityName>Entity', [$entity, $newForm]); | $this->executeDynamicMethod('persist<EntityName>Entity', [$entity, $newForm]); | ||||
$this->dispatch(EasyAdminEvents::POST_PERSIST, ['entity' => $entity]); | $this->dispatch(EasyAdminEvents::POST_PERSIST, ['entity' => $entity]); | ||||
if($newForm->get('stayOnPage')->getData() || $this->request->get('submitAndStay')){ | |||||
if($newForm->get('stayOnPage')->getData()!="false" || $this->request->get('submitAndStay')!==null){ | |||||
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $entity->getId()]) ; | return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $entity->getId()]) ; | ||||
}else { | }else { | ||||
return $this->redirectToReferrer(); | return $this->redirectToReferrer(); |
{ | { | ||||
$resolver->setDefaults([ | $resolver->setDefaults([ | ||||
'label' => false, | 'label' => false, | ||||
'csrf_protection'=> false, | |||||
'translation_domain' => 'lcshop', | 'translation_domain' => 'lcshop', | ||||
'fields' => false | 'fields' => false | ||||
]); | ]); |
return $this->unit; | return $this->unit; | ||||
} | } | ||||
public function setUnit(Unit $unit): self | |||||
public function setUnit(?Unit $unit): self | |||||
{ | { | ||||
$this->unit = $unit; | $this->unit = $unit; | ||||
min-height: 38px; | min-height: 38px; | ||||
} | } | ||||
/* ORDER */ | |||||
/* line 221, ../../sass/backend/custom.scss */ | |||||
.field-price .input-group.buyingPrice input, .field-price .input-group.buyingPrice .input-group-text { | |||||
font-weight: bold; | |||||
border-color: #222; | |||||
} | |||||
/* line 222, ../../sass/backend/custom.scss */ | |||||
.field-price .input-group.buyingPriceByRefUnit input, .field-price .input-group.buyingPriceByRefUnit .input-group-text { | |||||
font-weight: bold; | |||||
border-color: #222; | |||||
} | |||||
/* line 223, ../../sass/backend/custom.scss */ | |||||
.field-price .input-group.priceWithTax input, .field-price .input-group.priceWithTax .input-group-text { | |||||
font-weight: bold; | |||||
border-color: #222; | |||||
} | |||||
/* line 224, ../../sass/backend/custom.scss */ | /* line 224, ../../sass/backend/custom.scss */ | ||||
.field-price .input-group.priceByRefUnitWithTax input, .field-price .input-group.priceByRefUnitWithTax .input-group-text { | |||||
font-weight: bold; | |||||
border-color: #222; | |||||
} | |||||
/* line 225, ../../sass/backend/custom.scss */ | |||||
.input-group.multiplyingFactor input, .input-group.multiplyingFactor .input-group-text { | |||||
font-weight: bold; | |||||
border-color: #222; | |||||
} | |||||
/* ORDER */ | |||||
/* line 229, ../../sass/backend/custom.scss */ | |||||
.table-order-summary { | .table-order-summary { | ||||
width: 100%; | width: 100%; | ||||
} | } | ||||
/* line 227, ../../sass/backend/custom.scss */ | |||||
/* line 232, ../../sass/backend/custom.scss */ | |||||
.order-product-item.redelivery { | .order-product-item.redelivery { | ||||
background: rgba(18, 104, 253, 0.38) !important; | background: rgba(18, 104, 253, 0.38) !important; | ||||
} | } | ||||
/*.select2-container--bootstrap .select2-selection{max-width: none;}*/ | /*.select2-container--bootstrap .select2-selection{max-width: none;}*/ | ||||
/*.order-product-item{margin: 15px 0; padding: 0;}*/ | /*.order-product-item{margin: 15px 0; padding: 0;}*/ | ||||
/* Product */ | /* Product */ | ||||
/* line 232, ../../sass/backend/custom.scss */ | |||||
/* line 237, ../../sass/backend/custom.scss */ | |||||
.product-form-modal { | .product-form-modal { | ||||
display: none; | display: none; | ||||
} | } | ||||
/* line 233, ../../sass/backend/custom.scss */ | |||||
/* line 238, ../../sass/backend/custom.scss */ | |||||
.product-form.modal .form-check-label { | .product-form.modal .form-check-label { | ||||
font-style: italic; | font-style: italic; | ||||
color: #666; | color: #666; | ||||
text-align: left; | text-align: left; | ||||
} | } | ||||
/* line 234, ../../sass/backend/custom.scss */ | |||||
/* line 239, ../../sass/backend/custom.scss */ | |||||
.products-collection-table .inherited { | .products-collection-table .inherited { | ||||
color: #888; | color: #888; | ||||
font-style: italic; | font-style: italic; | ||||
font-weight: initial; | font-weight: initial; | ||||
} | } | ||||
/* line 235, ../../sass/backend/custom.scss */ | |||||
/* line 240, ../../sass/backend/custom.scss */ | |||||
.products-collection-table td { | .products-collection-table td { | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 236, ../../sass/backend/custom.scss */ | |||||
/* line 241, ../../sass/backend/custom.scss */ | |||||
.card-body.p-0 .products-collection-table tbody > tr > td:first-of-type, .card-body.p-0 .products-collection-table tbody > tr > th:first-of-type, .card-body.p-0 .products-collection-table thead > tr > td:first-of-type, .card-body.p-0 .products-collection-table thead > tr > th:first-of-type { | .card-body.p-0 .products-collection-table tbody > tr > td:first-of-type, .card-body.p-0 .products-collection-table tbody > tr > th:first-of-type, .card-body.p-0 .products-collection-table thead > tr > td:first-of-type, .card-body.p-0 .products-collection-table thead > tr > th:first-of-type { | ||||
padding-left: 0.35rem; | padding-left: 0.35rem; | ||||
} | } | ||||
/* line 237, ../../sass/backend/custom.scss */ | |||||
/* line 242, ../../sass/backend/custom.scss */ | |||||
.products-collection-table .btn-empty-field { | .products-collection-table .btn-empty-field { | ||||
position: absolute; | position: absolute; | ||||
right: 3px; | right: 3px; | ||||
padding: 0px; | padding: 0px; | ||||
} | } | ||||
/* line 238, ../../sass/backend/custom.scss */ | |||||
/* line 243, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table { | #lc-product-family-edit .products-collection-table { | ||||
table-layout: fixed; | table-layout: fixed; | ||||
/* background-clip: padding-box;*/ | /* background-clip: padding-box;*/ | ||||
border-collapse: collapse; | border-collapse: collapse; | ||||
} | } | ||||
/* line 239, ../../sass/backend/custom.scss */ | |||||
/* line 244, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table th { | #lc-product-family-edit .products-collection-table th { | ||||
font-size: 13px; | font-size: 13px; | ||||
border-left: 1px solid #dee2e6; | border-left: 1px solid #dee2e6; | ||||
border-bottom: 2px solid #dee2e6; | border-bottom: 2px solid #dee2e6; | ||||
} | } | ||||
/* line 240, ../../sass/backend/custom.scss */ | |||||
/* line 245, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table tfoot th { | #lc-product-family-edit .products-collection-table tfoot th { | ||||
border-top: 2px solid #dee2e6; | border-top: 2px solid #dee2e6; | ||||
} | } | ||||
/* line 241, ../../sass/backend/custom.scss */ | |||||
/* line 246, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table th span { | #lc-product-family-edit .products-collection-table th span { | ||||
white-space: initial; | white-space: initial; | ||||
} | } | ||||
/* line 242, ../../sass/backend/custom.scss */ | |||||
/* line 247, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table th:last-child { | #lc-product-family-edit .products-collection-table th:last-child { | ||||
border-right: 1px solid #dee2e6; | border-right: 1px solid #dee2e6; | ||||
} | } | ||||
/* line 243, ../../sass/backend/custom.scss */ | |||||
/* line 248, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table td { | #lc-product-family-edit .products-collection-table td { | ||||
border-left: 1px solid #dee2e6; | border-left: 1px solid #dee2e6; | ||||
text-align: center; | text-align: center; | ||||
border-bottom: 1px solid #dee2e6; | border-bottom: 1px solid #dee2e6; | ||||
} | } | ||||
/* line 244, ../../sass/backend/custom.scss */ | |||||
/* line 249, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table td:last-child { | #lc-product-family-edit .products-collection-table td:last-child { | ||||
border-right: 1px solid #dee2e6; | border-right: 1px solid #dee2e6; | ||||
white-space: nowrap; | white-space: nowrap; | ||||
} | } | ||||
/* line 245, ../../sass/backend/custom.scss */ | |||||
/* line 250, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .btn-add-product { | #lc-product-family-edit .btn-add-product { | ||||
margin: 20px 0; | margin: 20px 0; | ||||
float: right; | float: right; | ||||
} | } | ||||
/* line 246, ../../sass/backend/custom.scss */ | |||||
/* line 251, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .inherited { | #lc-product-family-edit .inherited { | ||||
color: #888; | color: #888; | ||||
font-style: italic; | font-style: italic; | ||||
font-weight: initial; | font-weight: initial; | ||||
} | } | ||||
/* line 247, ../../sass/backend/custom.scss */ | |||||
/* line 252, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table td .value { | #lc-product-family-edit .products-collection-table td .value { | ||||
min-width: 80%; | min-width: 80%; | ||||
margin: auto; | margin: auto; | ||||
cursor: pointer; | cursor: pointer; | ||||
} | } | ||||
/* line 248, ../../sass/backend/custom.scss */ | |||||
/* line 253, ../../sass/backend/custom.scss */ | |||||
#lc-product-family-edit .products-collection-table td .modal { | #lc-product-family-edit .products-collection-table td .modal { | ||||
text-align: left; | text-align: left; | ||||
} | } | ||||
/* line 249, ../../sass/backend/custom.scss */ | |||||
/* line 254, ../../sass/backend/custom.scss */ | |||||
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax { | table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax { | ||||
background: #eeeeee; | background: #eeeeee; | ||||
background-clip: padding-box; | background-clip: padding-box; | ||||
} | } | ||||
/* DeliveryZone */ | /* DeliveryZone */ | ||||
/* line 253, ../../sass/backend/custom.scss */ | |||||
/* line 258, ../../sass/backend/custom.scss */ | |||||
#autocomplete-cities { | #autocomplete-cities { | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 257, ../../sass/backend/custom.scss */ | |||||
/* line 262, ../../sass/backend/custom.scss */ | |||||
#autocomplete-cities .ui-autocomplete { | #autocomplete-cities .ui-autocomplete { | ||||
left: 30%; | left: 30%; | ||||
top: 41px; | top: 41px; | ||||
margin-left: 18px; | margin-left: 18px; | ||||
} | } | ||||
/* line 263, ../../sass/backend/custom.scss */ | |||||
/* line 268, ../../sass/backend/custom.scss */ | |||||
.head-reminders { | .head-reminders { | ||||
margin-top: 15px; | margin-top: 15px; | ||||
} | } | ||||
/* TABLEAU DE BORD */ | /* TABLEAU DE BORD */ | ||||
/* line 266, ../../sass/backend/custom.scss */ | |||||
/* line 271, ../../sass/backend/custom.scss */ | |||||
.todo-list > li { | .todo-list > li { | ||||
position: relative; | position: relative; | ||||
} | } | ||||
/* line 267, ../../sass/backend/custom.scss */ | |||||
/* line 272, ../../sass/backend/custom.scss */ | |||||
.todo-list > li .text { | .todo-list > li .text { | ||||
margin-left: 30px; | margin-left: 30px; | ||||
} | } | ||||
/* line 268, ../../sass/backend/custom.scss */ | |||||
/* line 273, ../../sass/backend/custom.scss */ | |||||
.todo-list > li .tools { | .todo-list > li .tools { | ||||
position: absolute; | position: absolute; | ||||
top: 4px; | top: 4px; | ||||
right: 15px; | right: 15px; | ||||
} | } | ||||
/* line 270, ../../sass/backend/custom.scss */ | |||||
/* line 275, ../../sass/backend/custom.scss */ | |||||
#addTicketMessageForm { | #addTicketMessageForm { | ||||
margin-top: 30px; | margin-top: 30px; | ||||
border-top: 2px dotted #eee; | border-top: 2px dotted #eee; | ||||
padding-top: 30px; | padding-top: 30px; | ||||
} | } | ||||
/* line 272, ../../sass/backend/custom.scss */ | |||||
/* line 277, ../../sass/backend/custom.scss */ | |||||
#dashboard .list-btn-statistic { | #dashboard .list-btn-statistic { | ||||
display: flex; | display: flex; | ||||
flex-wrap: wrap; | flex-wrap: wrap; | ||||
justify-content: center; | justify-content: center; | ||||
} | } | ||||
/* line 273, ../../sass/backend/custom.scss */ | |||||
/* line 278, ../../sass/backend/custom.scss */ | |||||
#dashboard .btn-statistic { | #dashboard .btn-statistic { | ||||
width: 120px; | width: 120px; | ||||
height: 70px; | height: 70px; | ||||
line-height: 1rem; | line-height: 1rem; | ||||
} | } | ||||
/* line 274, ../../sass/backend/custom.scss */ | |||||
/* line 279, ../../sass/backend/custom.scss */ | |||||
#dashboard .btn-statistic small { | #dashboard .btn-statistic small { | ||||
margin-bottom: 10px; | margin-bottom: 10px; | ||||
display: block; | display: block; | ||||
} | } | ||||
/* line 275, ../../sass/backend/custom.scss */ | |||||
/* line 280, ../../sass/backend/custom.scss */ | |||||
#dashboard .btn-statistic .value { | #dashboard .btn-statistic .value { | ||||
display: block; | display: block; | ||||
} | } |
function initLcCkEditor(){ | function initLcCkEditor(){ | ||||
var elements = $( '.lc-ckeditor' ); | var elements = $( '.lc-ckeditor' ); | ||||
log(elements); | |||||
if(elements.length) { | if(elements.length) { | ||||
for (var i = 0; i < elements.length; ++i) { | for (var i = 0; i < elements.length; ++i) { | ||||
var editor = CKEDITOR.replace(elements[i], { | |||||
"toolbar": [ | |||||
{ | |||||
name: "styles", | |||||
items: ["Format", 'Bold', 'Italic', 'Underline', 'Strike', "Link", "BulletedList"] | |||||
}, | |||||
{name: 'paragraph', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']}, | |||||
{name: 'insert', items: ['Image', 'SpecialChar']}, | |||||
{name: "document", items: ["Source"]}, | |||||
], | |||||
"language": "fr" | |||||
}); | |||||
if($(elements[i]).data('config')==='simple_config'){ | |||||
var editor = CKEDITOR.replace(elements[i], { | |||||
"toolbar": [ | |||||
{ | |||||
items: ['Bold', 'Italic', 'Underline', 'Strike'] | |||||
}, | |||||
{ | |||||
items: ["TextColor"] | |||||
} | |||||
], | |||||
"language": "fr", | |||||
'height': 100 | |||||
}); | |||||
}else{ | |||||
var editor = CKEDITOR.replace(elements[i], { | |||||
"toolbar": [ | |||||
{ | |||||
name: "styles", | |||||
items: ["Format", 'Bold', 'Italic', 'Underline', 'Strike', "Link", "BulletedList"] | |||||
}, | |||||
{ | |||||
items: ["TextColor"] | |||||
}, | |||||
{name: 'paragraph', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock']}, | |||||
{name: 'insert', items: ['Image', 'SpecialChar']}, | |||||
{name: "document", items: ["Source"]}, | |||||
], | |||||
"language": "fr" | |||||
}); | |||||
} | |||||
} | } | ||||
} | } | ||||
} | } |
}, | }, | ||||
finalPriceWithTaxAndReduction(){ | finalPriceWithTaxAndReduction(){ | ||||
return this.$parent.applyReduction(this.priceValue, this.priceWithTaxValue, this.taxRateValue, true); | return this.$parent.applyReduction(this.priceValue, this.priceWithTaxValue, this.taxRateValue, true); | ||||
}, | |||||
finalBuyingPrice:function () { | |||||
return parseFloat((this.buyingPriceByRefUnitValue * this.quantityValue) / this.unitCoefficient).toFixed(4); | |||||
} | } | ||||
}, | }, | ||||
unitUpdated: function () { | unitUpdated: function () { | ||||
this.quantityUpdated(); | this.quantityUpdated(); | ||||
}, | }, | ||||
quantityUpdated: function () { | quantityUpdated: function () { | ||||
} else if (this.behaviorPriceValue == 'by-reference-unit') { | } else if (this.behaviorPriceValue == 'by-reference-unit') { | ||||
this.setPriceFromPriceByRefUnit(); | this.setPriceFromPriceByRefUnit(); | ||||
this.setPriceWithTax(); | this.setPriceWithTax(); | ||||
log('ncihe'); | |||||
this.setBuyingPriceFromBuyingPriceByRefUnit(); | this.setBuyingPriceFromBuyingPriceByRefUnit(); | ||||
this.setBuyingPriceWithTax(); | this.setBuyingPriceWithTax(); | ||||
} | } | ||||
this.priceInherited = true; | this.priceInherited = true; | ||||
} | } | ||||
}, | }, | ||||
watch: {} | |||||
watch: { | |||||
} | |||||
} | } | ||||
; | ; |
this.title = toPlainText(this.title) | this.title = toPlainText(this.title) | ||||
this.title = toPlainText(this.title) | this.title = toPlainText(this.title) | ||||
this.title = toPlainText(this.title) | this.title = toPlainText(this.title) | ||||
this.title = toPlainText(this.title) | |||||
this.title = toPlainText(this.title); | |||||
//METHOD | //METHOD | ||||
//this.updateProductForm(); | //this.updateProductForm(); | ||||
//this.updateProductView(); | //this.updateProductView(); | ||||
if (e.shiftKey && e.keyCode == 9) { | if (e.shiftKey && e.keyCode == 9) { | ||||
e.preventDefault(); | e.preventDefault(); | ||||
$prevField = $(this).parents('td').prevAll('td:visible').first().find('input, select'); | $prevField = $(this).parents('td').prevAll('td:visible').first().find('input, select'); | ||||
log($prevField); | |||||
if($prevField.length == 0){ | |||||
$prevField = $(this).parents('td').prevAll('td:visible').first().prevAll('td:visible').first().find('input, select'); | |||||
} | |||||
app.setFocusOnField($prevField.data('ref'), $prevField.data('y')); | app.setFocusOnField($prevField.data('ref'), $prevField.data('y')); | ||||
//DROITE (tab) | //DROITE (tab) | ||||
} else if (e.keyCode == '9') { | } else if (e.keyCode == '9') { | ||||
e.preventDefault(); | e.preventDefault(); | ||||
$nextField = $(this).parents('td').nextAll('td:visible').first().find('input, select'); | $nextField = $(this).parents('td').nextAll('td:visible').first().find('input, select'); | ||||
if($nextField.length == 0){ | |||||
$nextField = $(this).parents('td').nextAll('td:visible').first().nextAll('td:visible').first().find('input, select'); | |||||
} | |||||
app.setFocusOnField($nextField.data('ref'), $nextField.data('y')); | app.setFocusOnField($nextField.data('ref'), $nextField.data('y')); | ||||
} | } | ||||
}, | }, | ||||
postForm:function(){ | postForm:function(){ | ||||
this.stayOnPage = 1; | this.stayOnPage = 1; | ||||
$("#edit-productfamily-form").submit(); | |||||
this.$nextTick(function () { | |||||
$("#edit-productfamily-form").submit(); | |||||
}); | |||||
}, | }, | ||||
initLcSortableProductsList: function () { | initLcSortableProductsList: function () { |
.autoresize textarea{height: auto; min-height: 38px;} | .autoresize textarea{height: auto; min-height: 38px;} | ||||
.field-price .input-group.buyingPrice input,.field-price .input-group.buyingPrice .input-group-text{font-weight: bold; border-color: #222 } | |||||
.field-price .input-group.buyingPriceByRefUnit input,.field-price .input-group.buyingPriceByRefUnit .input-group-text{font-weight: bold; border-color: #222 } | |||||
.field-price .input-group.priceWithTax input,.field-price .input-group.priceWithTax .input-group-text{font-weight: bold; border-color: #222 } | |||||
.field-price .input-group.priceByRefUnitWithTax input,.field-price .input-group.priceByRefUnitWithTax .input-group-text{font-weight: bold; border-color: #222 } | |||||
.input-group.multiplyingFactor input,.input-group.multiplyingFactor .input-group-text{font-weight: bold; border-color: #222 } | |||||
/* ORDER */ | /* ORDER */ | ||||
quantityProduct: Quantité (en rapport à l'unité) | quantityProduct: Quantité (en rapport à l'unité) | ||||
unit: Unité | unit: Unité | ||||
redeliverySupplier: Erreur producteur | redeliverySupplier: Erreur producteur | ||||
redeliverySupplierOrder: À rappeler au prochain bon de commande producteur | |||||
redeliverySupplierOrder: A recommander au producteur | |||||
deliveryType: Type de livraison | deliveryType: Type de livraison | ||||
deliveryTypeOptions: | deliveryTypeOptions: | ||||
point-sale: En ambassade | point-sale: En ambassade |
</div> | </div> | ||||
<div class="col-6"> | <div class="col-6"> | ||||
<div class="form-widget"> | <div class="form-widget"> | ||||
<div class="input-group"> | |||||
<div class="input-group {{ fieldName }}"> | |||||
{{ form_widget(field, {'attr' : {'v-model': fieldName, '@change' : fieldName~'Updated'}}) }} | {{ form_widget(field, {'attr' : {'v-model': fieldName, '@change' : fieldName~'Updated'}}) }} | ||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">€ HT | <span class="input-group-text">€ HT | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="col-6"> | <div class="col-6"> | ||||
<div class="input-group"> | |||||
<div class="input-group {{ fieldName }}WithTax"> | |||||
{{ form_widget(fieldTax, {'attr' : {'v-model': fieldName ~ 'WithTax', '@change' : fieldName~'WithTaxUpdated'}}) }} | {{ form_widget(fieldTax, {'attr' : {'v-model': fieldName ~ 'WithTax', '@change' : fieldName~'WithTaxUpdated'}}) }} | ||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">€ TTC | <span class="input-group-text">€ TTC |
{% block plugin_javascript %} | {% block plugin_javascript %} | ||||
{{ parent() }} | {{ parent() }} | ||||
<script src="{{ asset('bundles/lcshop/js/backend/plugin/jquery-ui/jquery-ui.min.js') }}"></script> | <script src="{{ asset('bundles/lcshop/js/backend/plugin/jquery-ui/jquery-ui.min.js') }}"></script> | ||||
<script type="text/javascript"> | |||||
var CKEDITOR_BASEPATH = "{{ ckeditor_base_path("/bundles/fosckeditor/") }}"; | |||||
</script> | |||||
<script type="text/javascript" src="{{ asset('bundles/fosckeditor/ckeditor.js') }}"></script> | |||||
{#{% if jquery %} | |||||
<script type="text/javascript" src="{{ ckeditor_js_path(jquery_path) }}"></script> | |||||
{% endif %}#} | |||||
{% endblock %} | {% endblock %} | ||||
{% block script_javascript %} | {% block script_javascript %} |
{% endblock %} | {% endblock %} | ||||
{% block _ckeditor_javascript %} | {% block _ckeditor_javascript %} | ||||
{% if autoload %} | |||||
{# {% if autoload %} | |||||
<script type="text/javascript"> | <script type="text/javascript"> | ||||
var CKEDITOR_BASEPATH = "{{ ckeditor_base_path(base_path) }}"; | var CKEDITOR_BASEPATH = "{{ ckeditor_base_path(base_path) }}"; | ||||
</script> | </script> | ||||
{% if jquery %} | {% if jquery %} | ||||
<script type="text/javascript" src="{{ ckeditor_js_path(jquery_path) }}"></script> | <script type="text/javascript" src="{{ ckeditor_js_path(jquery_path) }}"></script> | ||||
{% endif %} | {% endif %} | ||||
{% endif %} | |||||
{% endif %}#} | |||||
{#<script type="text/javascript"> | {#<script type="text/javascript"> | ||||
{% if jquery %} | {% if jquery %} | ||||
$(function () { | $(function () { |
<div v-show="{{ field_name }}Inherited == true"> | <div v-show="{{ field_name }}Inherited == true"> | ||||
{{ form_widget(field, {'attr' : {'v-model' : field_name , 'v-on:focusout': field_name~'Inherited = false', '@change' : field_name~'Updated', 'data-ref': field_name~'Inherited', ':data-y' : "keyForm" }}) }} | {{ form_widget(field, {'attr' : {'v-model' : field_name , 'v-on:focusout': field_name~'Inherited = false', '@change' : field_name~'Updated', 'data-ref': field_name~'Inherited', ':data-y' : "keyForm" }}) }} | ||||
</div> | </div> | ||||
<button v-show="{{ field_name }}" v-on:click="{{ field_name }} = null; {{ field_name }}Inherited = false; " | |||||
<button v-show="{{ field_name }}" v-on:click="{{ field_name }} = null; {{ field_name }}Inherited = false;" | |||||
class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> | class="btn btn-empty-field" type="button"><i class="fa fa-undo"></i></button> | ||||
</td> | </td> | ||||
{% endmacro %} | {% endmacro %} | ||||
{{ _self.product_field(3, product.buyingPriceWithTax, 'buyingPriceWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }} | {{ _self.product_field(3, product.buyingPriceWithTax, 'buyingPriceWithTax',false, '€', 'v-show="productFamily.behaviorPrice == \'' ~ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_PIECE') ~ '\'"') }} | ||||
<td class="buyingPrice" colspan="3" v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'"> | <td class="buyingPrice" colspan="3" v-show="productFamily.behaviorPrice == '{{ constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT') }}'"> | ||||
{% verbatim %}{{ buyingPriceValue }}{% endverbatim %}€ | |||||
{% verbatim %}{{ finalBuyingPrice }}{% endverbatim %}€ | |||||
</td> | </td> | ||||
{{ _self.product_field(3, product.multiplyingFactor, 'multiplyingFactor') }} | {{ _self.product_field(3, product.multiplyingFactor, 'multiplyingFactor') }} |
<div class="col-6"> | <div class="col-6"> | ||||
<div class="form-widget"> | <div class="form-widget"> | ||||
{{ form_label(form.multiplyingFactor) }} | {{ form_label(form.multiplyingFactor) }} | ||||
<div class="input-group"> | |||||
<div class="input-group multiplyingFactor"> | |||||
{{ form_widget(form.multiplyingFactor, {'attr': {'v-model':'multiplyingFactor', '@change' : 'multiplyingFactorUpdated'}}) }} | {{ form_widget(form.multiplyingFactor, {'attr': {'v-model':'multiplyingFactor', '@change' : 'multiplyingFactorUpdated'}}) }} | ||||
<div class="input-group-append"> | <div class="input-group-append"> | ||||
<span class="input-group-text">X</span> | <span class="input-group-text">X</span> |