mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -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";
|
"use strict";
|
||||||
|
|
||||||
function onSubmit(e) {
|
function onSubmit(e) {
|
||||||
return dom.parentWithClass(this, "page").querySelector(".chkAccept").checked ? Dashboard.navigate("wizardfinish.html") : Dashboard.alert({
|
if (dom.parentWithClass(this, "page").querySelector(".chkAccept").checked) {
|
||||||
|
Dashboard.navigate("wizardfinish.html");
|
||||||
|
} else {
|
||||||
|
Dashboard.alert({
|
||||||
message: Globalize.translate("MessagePleaseAcceptTermsOfServiceBeforeContinuing"),
|
message: Globalize.translate("MessagePleaseAcceptTermsOfServiceBeforeContinuing"),
|
||||||
title: ""
|
title: ""
|
||||||
}), e.preventDefault(), !1
|
});
|
||||||
}
|
}
|
||||||
return function(view, params) {
|
|
||||||
view.querySelector(".wizardAgreementForm").addEventListener("submit", onSubmit), view.addEventListener("viewshow", function() {
|
e.preventDefault();
|
||||||
document.querySelector(".skinHeader").classList.add("noHomeButtonHeader")
|
return false;
|
||||||
}), 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