[WIP] Fix cosmetics, prices

This commit is contained in:
Ludovic CANDELLIER
2020-06-07 23:15:22 +02:00
parent 424fb43b20
commit 066744e082
35 changed files with 230 additions and 193 deletions

View File

@@ -49,3 +49,31 @@
@include('components.uploader.widget', ['delete_url' => route('Shop.Admin.Articles.deleteImage') ])
</div>
</div>
@push('js')
<script>
$("#model_id").change( function(e) {
var model = $('#model_id').select2('data');
var name = model[0]['text'];
$('input[name="name"]').val(name);
});
$('#model').change( function() {
loadVarieties();
});
function loadVarieties() {
$.ajax({
url : '{{ route('Botanic.Admin.Varieties.getSelect') }}',
method : 'POST',
data: {model: $('#model').val()},
success : function(data) {
$("#model_id").select2({data: data});
}
});
}
loadVarieties();
</script>
@endpush