2016-03-18 21:26:17 -07:00
|
|
|
|
define(['jQuery'], function ($) {
|
2015-01-05 20:25:23 -07:00
|
|
|
|
|
2015-06-06 19:51:04 -07:00
|
|
|
|
function onSubmit() {
|
|
|
|
|
|
2015-07-30 07:34:46 -07:00
|
|
|
|
var page = $(this).parents('.page')[0];
|
2015-01-05 20:25:23 -07:00
|
|
|
|
|
2015-07-30 07:34:46 -07:00
|
|
|
|
if (page.querySelector('.chkAccept').checked) {
|
2015-01-05 20:25:23 -07:00
|
|
|
|
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-09-01 07:01:59 -07:00
|
|
|
|
$(document).on('pageinit', '#wizardAgreementPage', function () {
|
2015-01-05 20:25:23 -07:00
|
|
|
|
|
2015-07-30 07:34:46 -07:00
|
|
|
|
$('.wizardAgreementForm').off('submit', onSubmit).on('submit', onSubmit);
|
2015-06-06 19:51:04 -07:00
|
|
|
|
});
|
2015-01-05 20:25:23 -07:00
|
|
|
|
|
2016-03-18 21:26:17 -07:00
|
|
|
|
});
|