validate_form(): add support of Bootstrap switches
This commit is contained in:
parent
075519220b
commit
2beee5c645
1 changed files with 5 additions and 0 deletions
|
@ -148,6 +148,11 @@ function validate_form(form, keep_empty = false) {
|
||||||
data[$(checkbox).attr("name")] = $(checkbox).is(":checked");
|
data[$(checkbox).attr("name")] = $(checkbox).is(":checked");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
form.find(".form-switch input[type=checkbox]").each(function (idx, checkbox) {
|
||||||
|
if ($(checkbox).attr("name")) {
|
||||||
|
data[$(checkbox).attr("name")] = $(checkbox).is(":checked");
|
||||||
|
}
|
||||||
|
});
|
||||||
console.log(data);
|
console.log(data);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue