Modals add selectors

This commit is contained in:
cuneytsenturk
2019-02-09 17:14:27 +03:00
parent 2455175293
commit d61d16c723
7 changed files with 56 additions and 13 deletions

View File

@ -62,14 +62,14 @@
$('#modal-create-tax').modal('hide');
$("#tax_id").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
$('#tax_id').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
$('#tax_id').trigger('change');
$("#tax_id").select2('refresh');
$('#tax_id').select2('refresh');
@if ($tax_selector)
$("{{ $tax_selector }}").append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
$('{{ $tax_selector }}').append('<option value="' + data.id + '" selected="selected">' + data.name + '</option>');
$('{{ $tax_selector }}').trigger('change');
$("{{ $tax_selector }}").select2('refresh');
$('{{ $tax_selector }}').select2('refresh');
@endif
},
error: function(error, textStatus, errorThrown) {