#1623 Input filters not working

This commit is contained in:
Diatrex 2020-06-04 13:13:56 +03:00
parent 6a640cac41
commit da0847346f

View File

@ -176,10 +176,14 @@ $('.ad-info-right-bar-video').tooltip({
$("#listFilterForm").submit(function(e) {
const inputs = $('#listFilterForm :input');
[...inputs].forEach((input) => {
if ($(input).val() == ""
|| $(input).prop("checked") == false
|| $(input).find(':selected').val() == "") {
$(input).prop('disabled', true);
if (input.type === 'checkbox' || input.type === 'radio') {
if ($(input).prop("checked") == false) {
$(input).prop('disabled', true);
}
} else {
if ($(input).val() == "" || $(input).find(':selected').val() == "") {
$(input).prop('disabled', true);
}
}
});
});