[WIP] Fix cosmetics, prices
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user