modularize scripts
This commit is contained in:
@@ -31,7 +31,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
function onSubmit(page) {
|
||||
function onSubmit() {
|
||||
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
ApiClient.ajax({
|
||||
|
||||
@@ -46,18 +48,11 @@
|
||||
|
||||
processForgotPasswordResult(page, result);
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
window.ForgotPasswordPinPage = {
|
||||
|
||||
onSubmit: function () {
|
||||
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
onSubmit(page);
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
$(document).on('pageinitdepends', '#forgotPasswordPinPage', function () {
|
||||
$('.forgotPasswordPinForm').off('submit', onSubmit).on('submit', onSubmit);
|
||||
});
|
||||
|
||||
})(window);
|
||||
Reference in New Issue
Block a user