mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 12:08:40 +02:00
combobox init js
This commit is contained in:
parent
0076f252fe
commit
dfdf5ae555
1 changed files with 14 additions and 0 deletions
14
src/registrar/assets/js/get-gov-admin-extra.js
Normal file
14
src/registrar/assets/js/get-gov-admin-extra.js
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue