implement JS password scoring, td_stock approve logicc
This commit is contained in:
+28
-2
@@ -1,3 +1,27 @@
|
||||
/** =========================
|
||||
* UTILITIES
|
||||
* ========================= */
|
||||
|
||||
/**
|
||||
* Returns a debounced version of fn that delays invoking until
|
||||
* after `wait` ms have elapsed since the last call.
|
||||
*/
|
||||
function debounce(fn, wait) {
|
||||
wait = wait || 300;
|
||||
var timer;
|
||||
return function (event) {
|
||||
var ctx = this;
|
||||
var args = arguments;
|
||||
// Persist the jQuery event so it's accessible after the timeout
|
||||
if (event && event.persist) event.persist();
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(function () {
|
||||
fn.apply(ctx, args);
|
||||
}, wait);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/** =========================
|
||||
* DEFAULT ON LOAD FUNCTION
|
||||
* ========================= */
|
||||
@@ -355,9 +379,11 @@ function prepare_form_data(check_required, raw_data) {
|
||||
q[key] = value;
|
||||
});
|
||||
|
||||
// Collect form inputs
|
||||
$(".form-control, .form-select").each(function () {
|
||||
// Collect form inputs (exclude search inputs — UI-only filters, not API data)
|
||||
$(".form-control:not([type=search]), .form-select").each(function () {
|
||||
if (!$(this).attr("id")) return true;
|
||||
var el = $(this).get(0);
|
||||
if (!el || !el.nodeName) return true;
|
||||
q[$(this).attr("id")] = $(this).val();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user