1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/wizardagreement.js

25 lines
622 B
JavaScript
Raw Normal View History

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