2015-01-05 20:25:23 -07:00
|
|
|
|
(function (window, $) {
|
|
|
|
|
|
2015-06-06 19:51:04 -07:00
|
|
|
|
function onSubmit() {
|
|
|
|
|
|
|
|
|
|
var page = $(this).parents('.page');
|
2015-01-05 20:25:23 -07:00
|
|
|
|
|
|
|
|
|
if ($('#chkAccept', page).checked()) {
|
|
|
|
|
Dashboard.navigate('wizardfinish.html');
|
2015-01-09 22:53:35 -07:00
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
Dashboard.alert({
|
|
|
|
|
message: Globalize.translate('MessagePleaseAcceptTermsOfServiceBeforeContinuing'),
|
|
|
|
|
title: ''
|
|
|
|
|
});
|
2015-01-05 20:25:23 -07:00
|
|
|
|
}
|
|
|
|
|
|
2015-06-06 19:51:04 -07:00
|
|
|
|
return false;
|
|
|
|
|
}
|
2015-01-05 20:25:23 -07:00
|
|
|
|
|
2015-06-06 19:51:04 -07:00
|
|
|
|
$(document).on('pageinitdepends', '#wizardAgreementPage', function(){
|
2015-01-05 20:25:23 -07:00
|
|
|
|
|
2015-06-06 19:51:04 -07:00
|
|
|
|
$('.wizardAgreementForm').off('submit', onSubmit).on('submit', onSubmit);
|
|
|
|
|
});
|
2015-01-05 20:25:23 -07:00
|
|
|
|
|
|
|
|
|
})(window, jQuery);
|