Merge pull request #14223 from Godmartinz/user-bulk-edit

Fixed Select2 functionality in User bulk check-in Delete User
This commit is contained in:
snipe 2024-02-06 18:22:46 +00:00 committed by GitHub
commit 5f8ac66036
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -131,14 +131,15 @@
$(":submit").attr("disabled", "disabled"); $(":submit").attr("disabled", "disabled");
$("[name='status_id']").on('select2:select', function (e) { //The line below needs to be here because in mobile view the status_id select2 forgets its select2 so this makes it function properly.
if (e.params.data.id != ""){ $("[name='status_id']").select2();
console.log(e.params.data.id); $("[name='status_id']").on('select2:select', function (e) {
$(":submit").removeAttr("disabled"); if (e.params.data.id != "") {
} console.log(e.params.data.id);
else { $(":submit").removeAttr("disabled");
$(":submit").attr("disabled", "disabled"); } else {
} $(":submit").attr("disabled", "disabled");
}); }
});
</script> </script>
@stop @stop