combobox init js

This commit is contained in:
Rachid Mrad 2024-08-28 17:24:40 -04:00
parent 0076f252fe
commit dfdf5ae555
No known key found for this signature in database

View file

@ -0,0 +1,14 @@
// Use Django's jQuery with Select2 to make the user select on the user transfer view a combobox
(function($) {
$(document).ready(function() {
if ($) {
$("#selected_user").select2({
width: 'resolve',
placeholder: 'Select a user',
allowClear: true
});
} else {
console.error('jQuery is not available');
}
});
})(window.jQuery);