{"id":19844,"date":"2026-07-15T11:04:29","date_gmt":"2026-07-15T10:04:29","guid":{"rendered":"https:\/\/esbuk.org\/?page_id=19844"},"modified":"2026-07-15T11:12:56","modified_gmt":"2026-07-15T10:12:56","slug":"esol-brochure-download-complete","status":"publish","type":"page","link":"https:\/\/esbuk.org\/index.php\/esol-brochure-download-complete\/","title":{"rendered":"ESOL Brochure Registration"},"content":{"rendered":"\n<script>\n(function () {\n\n    \/*********************************************************\n     * ESB ESOL Skills for Life eBrochure Callback\n     * -------------------------------------------------------\n     * Called after successful ClickDimensions form submission.\n     *\n     * Responsibilities:\n     * 1. Escape the iframe.\n     * 2. Set brochure download cookie.\n     * 3. Retrieve originating page.\n     * 4. Redirect visitor back.\n     *********************************************************\/\n\n    const COOKIE_NAME = \"esb_brochure_status\";\n    const COOKIE_VALUE = \"downloaded\";\n\n    const STORAGE_KEY = \"esbBrochureReturnUrl\";\n\n    const FALLBACK_URL =\n        \"https:\/\/esbuk.org\/index.php\/esol-skills-for-life\/\";\n\n    \/*********************************************************\n     * STEP 1\n     * If we're inside the ClickDimensions iframe,\n     * reload this page in the full browser window.\n     *********************************************************\/\n\n    if (window.self !== window.top) {\n\n        window.top.location.href = window.location.href;\n        return;\n\n    }\n\n    \/*********************************************************\n     * STEP 2\n     * Create the brochure cookie.\n     *********************************************************\/\n\n    const expiry = new Date();\n    expiry.setFullYear(expiry.getFullYear() + 1);\n\n    document.cookie =\n        COOKIE_NAME +\n        \"=\" +\n        COOKIE_VALUE +\n        \";expires=\" +\n        expiry.toUTCString() +\n        \";path=\/;domain=.esbuk.org;SameSite=Lax;Secure\";\n\n    \/*********************************************************\n     * STEP 3\n     * Retrieve the original ESOL page.\n     *********************************************************\/\n\n    const returnUrl =\n        localStorage.getItem(STORAGE_KEY);\n\n    \/*********************************************************\n     * STEP 4\n     * Clean up local storage.\n     *********************************************************\/\n\n    localStorage.removeItem(STORAGE_KEY);\n\n    \/*********************************************************\n     * STEP 5\n     * Return visitor.\n     *********************************************************\/\n\n    if (returnUrl) {\n\n        window.location.replace(returnUrl);\n\n    } else {\n\n        window.location.replace(FALLBACK_URL);\n\n    }\n\n})();\n<\/script>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"wp-custom-template-esb-template","meta":{"footnotes":""},"class_list":["post-19844","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/esbuk.org\/index.php\/wp-json\/wp\/v2\/pages\/19844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/esbuk.org\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/esbuk.org\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/esbuk.org\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/esbuk.org\/index.php\/wp-json\/wp\/v2\/comments?post=19844"}],"version-history":[{"count":2,"href":"https:\/\/esbuk.org\/index.php\/wp-json\/wp\/v2\/pages\/19844\/revisions"}],"predecessor-version":[{"id":19846,"href":"https:\/\/esbuk.org\/index.php\/wp-json\/wp\/v2\/pages\/19844\/revisions\/19846"}],"wp:attachment":[{"href":"https:\/\/esbuk.org\/index.php\/wp-json\/wp\/v2\/media?parent=19844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}