mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
wizardagreement.js
This commit is contained in:
parent
678b558935
commit
307e664286
@ -1,17 +1,27 @@
|
||||
define(["dom", "emby-button"], function(dom) {
|
||||
define(["dom", "emby-button"], function (dom) {
|
||||
"use strict";
|
||||
|
||||
function onSubmit(e) {
|
||||
return dom.parentWithClass(this, "page").querySelector(".chkAccept").checked ? Dashboard.navigate("wizardfinish.html") : Dashboard.alert({
|
||||
message: Globalize.translate("MessagePleaseAcceptTermsOfServiceBeforeContinuing"),
|
||||
title: ""
|
||||
}), e.preventDefault(), !1
|
||||
if (dom.parentWithClass(this, "page").querySelector(".chkAccept").checked) {
|
||||
Dashboard.navigate("wizardfinish.html");
|
||||
} else {
|
||||
Dashboard.alert({
|
||||
message: Globalize.translate("MessagePleaseAcceptTermsOfServiceBeforeContinuing"),
|
||||
title: ""
|
||||
});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
return function(view, params) {
|
||||
view.querySelector(".wizardAgreementForm").addEventListener("submit", onSubmit), view.addEventListener("viewshow", function() {
|
||||
document.querySelector(".skinHeader").classList.add("noHomeButtonHeader")
|
||||
}), view.addEventListener("viewhide", function() {
|
||||
document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader")
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
return function (view, params) {
|
||||
view.querySelector(".wizardAgreementForm").addEventListener("submit", onSubmit);
|
||||
view.addEventListener("viewshow", function () {
|
||||
document.querySelector(".skinHeader").classList.add("noHomeButtonHeader");
|
||||
});
|
||||
view.addEventListener("viewhide", function () {
|
||||
document.querySelector(".skinHeader").classList.remove("noHomeButtonHeader");
|
||||
});
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user