Viewing File: /usr/local/cpanel/whostmgr/docroot/templates/gsw/initial_setup/index.tmpl
[%
USE Whostmgr;
USE JSON;
SET stylesheets = CPANEL.is_debug_mode_enabled() ?
[ Whostmgr.find_file_url('/templates/gsw/initial_setup/index.css') ]:
[ Whostmgr.find_file_url('/templates/gsw/initial_setup/index.min.css') ];
SET PAGE_BASE = '/scripts3/initial_setup_wizard1';
SET PAGE_PATH = cp_security_token _ PAGE_BASE;
SET PAGE_NAME = Whostmgr.get_page_name_by_url(PAGE_BASE);
SET VIEW_NAME = String.new(Whostmgr.ENV.SCRIPT_NAME).remove(PAGE_PATH).text || '/legal';
SET PAGE_URL = PAGE_BASE _ VIEW_NAME;
SET WHM_URL = (Whostmgr.ENV.HTTPS == 'on' ? 'https://' : 'http://') _ Whostmgr.ENV.HTTP_HOST _ ':' _ Whostmgr.ENV.SERVER_PORT _ cp_security_token;
SET PAGE_DATA = {
agreements => data.agreements,
};
WRAPPER 'master_templates/master.tmpl'
base = PAGE_URL,
skipbreadcrumb = 1,
skipsupport = 1,
skipheader = 1,
skipfooter = 1,
hide_header = 1,
hide_navigation = 1,
hide_license_warnings = 1,
stylesheets = stylesheets,
CJT2_EXCLUSIVE = 1,
theme = 'bootstrap';
%]
<div id="content" ng-controller="introController as intro">
<div id="intro-section" ng-class="{ 'fade-out': intro.isDone }" ng-click="intro.skip()" disable-animations>
<div class="product-logo">
[% Whostmgr.find_file_and_insert('/images/cpanel_whm_logo.svg') %]
</div>
<div class="animated-line"></div>
<p class="platform-of-choice">
[% locale.maketext('The hosting platform of choice.') %]
</p>
</div>
<div id="main-section" class="ng-cloak" ng-class="{ 'fade-in': intro.isDone }" ng-cloak>
<div class="product-logo">
[% Whostmgr.find_file_and_insert('/images/cpanel_whm_logo.svg') %]
</div>
<div ng-view></div>
</div>
<script type="text/ng-template" id="gsw/initial_setup/views/legalView.ptt">
[% PROCESS 'gsw/initial_setup/views/legalView.ptt' %]
</script>
<script type="text/ng-template" id="gsw/initial_setup/views/trialLicenseActivationView.ptt">
[% PROCESS 'gsw/initial_setup/views/trialLicenseActivationView.ptt' %]
</script>
<script type="text/ng-template" id="gsw/initial_setup/views/infoView.ptt">
[% PROCESS 'gsw/initial_setup/views/infoView.ptt' %]
</script>
<script type="text/ng-template" id="gsw/initial_setup/views/createAccountView.ptt">
[% PROCESS 'gsw/initial_setup/views/createAccountView.ptt' %]
</script>
</div>
<script type="text/javascript">
var PAGE = [% data.json() %];
PAGE.baseURL = [% WHM_URL.json %];
PAGE.pageURL = [% PAGE_BASE.json %];
PAGE.cp_security_token = "[% cp_security_token %]";
(function() {
var viewedIntroSessionKey = "viewedIntro" + PAGE.cp_security_token;
function skipIntro() {
// Set PAGE.introEndTime to readonly so it can't be overridden
Object.defineProperty(PAGE, "introEndTime", {
value: Date.now(),
});
document.body.removeEventListener("click", skipIntro);
};
function introHasBeenViewed() {
if (typeof(Storage) === "undefined") {
return false;
}
var sessionValue = sessionStorage.getItem(viewedIntroSessionKey);
return sessionValue === "true";
}
function setIntroHasBeenViewed() {
if (typeof(Storage) === "undefined") {
return false;
}
sessionStorage.setItem(viewedIntroSessionKey, "true");
}
function waitForIntro() {
PAGE.introEndTime = Date.now() + 3400;
}
function hideTagline() {
var tagLine = document.querySelector(".platform-of-choice");
if(tagLine) {
// Set visibility to hidden so there are no visual shifts
tagLine.classList.add("invisible");
}
}
// This is to skip past the intro screen as soon as angular loads when redirected
// from the cPStore during trial license activation. It also will skip if the
// application is reloaded.
if( introHasBeenViewed() ) {
hideTagline();
skipIntro();
} else {
setIntroHasBeenViewed();
window.addEventListener("load", waitForIntro);
document.body.addEventListener("click", skipIntro);
}
})();
</script>
[% PROCESS 'master_templates/cjt2_header_include.tt' %]
[% END # WRAPPER %]
Back to Directory
File Manager