jellyfin-web/dashboard-ui/scripts/wizardagreement.js

25 lines
616 B
JavaScript
Raw Normal View History

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
});