{"id":2371,"date":"2025-02-23T19:06:39","date_gmt":"2025-02-23T18:06:39","guid":{"rendered":"https:\/\/www.ccchampdemars.com\/connection\/"},"modified":"2025-03-24T12:58:46","modified_gmt":"2025-03-24T11:58:46","slug":"login","status":"publish","type":"page","link":"https:\/\/www.ccchampdemars.com\/en\/login\/","title":{"rendered":"Connection"},"content":{"rendered":"<section class=\"section section--connexion\">\n\n    <div class=\"container\">\n        <nav aria-label=\"breadcrumbs\" class=\"breadcrumbs\">\n            <ol>\n                <li>\n                    <a href=\"\/\">\n                        Home                    <\/a>\n                    <span aria-hidden=\"true\">\n                        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 320 512\">\n                            <path\n                                d=\"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z\"\/>\n                        <\/svg>\n                        <\/span>\n                <\/li>\n                <li>\n                    <a href=\"#\" aria-current=\"location\">Login<\/a>\n                <\/li>\n            <\/ol>\n        <\/nav>\n    <\/div>\n\n    <header class=\"section__header\">\n        <div class=\"container\">\n            <h1 class=\"section__title\">Login<\/h1>\n            <div class=\"section__text\">\n                <p>Welcome to the CV Library of your Champ de Mars Center!<br \/>\r\nLooking for the perfect candidate? Browse through numerous resumes here!<br \/>\r\n<br \/>\r\nPlease log in. <br \/>\r\n<br \/>\r\nHappy searching!<\/p>\n            <\/div>\n        <\/div>\n    <\/header>\n\n    <div class=\"section__content\">\n        <div class=\"container\">\n            <form id=\"login-form\" action=\"https:\/\/www.ccchampdemars.com\/en\/wp4dm1n\/\" method=\"post\">\n                <div class=\"form form--reservation form-with-animated-labels\">\n                    <div class=\"form__row\">\n                        <div class=\"form__group\">\n                            <span>\n                                <input type=\"text\" name=\"log\" id=\"user_login\">\n                            <\/span>\n                            <label for=\"user_login\">Username<span>*<\/span><\/label>\n                        <\/div>\n                    <\/div>\n                    <div class=\"form__row\">\n                        <div class=\"form__group hide\" id=\"passGroup\">\n                            <span>\n                                <input type=\"password\" name=\"pwd\" id=\"user_pass\">\n                            <\/span>\n                            <label for=\"user_pass\">Password<span>*<\/span><\/label>\n                            <span class=\"eye\" id=\"eye\">\n\n                            <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 640 512\">\n                                <path d=\"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm51.3 163.3l-41.9-33C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5zm-88-69.3L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8z\"\/><\/svg>\n                            <\/span>\n                            <span class=\"eye-hide\" id=\"eyeHide\">\n                             <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 576 512\">\n                                    <path d=\"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z\"\/><\/svg>\n                            <\/span>\n                        <\/div>\n                    <\/div>\n                    <div class=\"form__row\">\n                        <input type=\"submit\" id=\"btnSubmit\" value=\"Connect\" class=\"btn btn--submit\">\n                        <div id=\"form-messages\" class=\"form-messages\"><\/div>\n                    <\/div>\n                <\/div>\n            <\/form>\n        <\/div>\n    <\/div>\n<\/section>\n\n<script>\n    const formMessage = document.getElementById('form-messages');\n    const passGroup = document.getElementById('passGroup');\n    const passInputEye = document.getElementById('user_pass');\n    const eye = document.getElementById('eye');\n    const eyeHide = document.getElementById('eyeHide');\n\n    eye.addEventListener('click', () => {\n        passInputEye.type = 'password';\n        if (!passGroup.classList.contains('hide')) {\n            passGroup.classList.add('hide')\n        }\n    })\n\n    eyeHide.addEventListener('click', () => {\n        passInputEye.type = 'text';\n        passGroup.classList.remove('hide')\n    })\n\n    document.getElementById('user_pass').addEventListener('keydown', () => {\n        formMessage.innerText = '';\n    })\n\n    document.getElementById('user_login').addEventListener('keydown', () => {\n        formMessage.innerText = '';\n    })\n    document.getElementById('login-form').addEventListener('submit', function (e) {\n        e.preventDefault(); \/\/ Emp\u00eache le formulaire de se soumettre normalement\n\n        const btnSubmit = document.querySelector('#btnSubmit');\n        const btnSubmitLoadingText = 'Connecting...';\n        const btnSubmitText = btnSubmit.value;\n        btnSubmit.value =btnSubmitLoadingText;\n\n        \/\/ R\u00e9cup\u00e8re les donn\u00e9es du formulaire\n        var formData = new FormData(this);\n\n        \/\/ Envoie la requ\u00eate AJAX\n        var xhr = new XMLHttpRequest();\n        xhr.open('POST', 'https:\/\/www.ccchampdemars.com\/en\/wp4dm1n\/', true);\n        xhr.onload = function () {\n            btnSubmit.value = btnSubmitText;\n            if (xhr.status === 200) {\n                \/\/ V\u00e9rifie si la r\u00e9ponse contient 'success', indiquant une connexion r\u00e9ussie\n                if (xhr.responseText.indexOf('success') !== -1) {\n                    btnSubmit.value =btnSubmitLoadingText;\n\n                                                            window.location.href = '\/en\/cv-library';\n                                    } else {\n                    \/\/ Affiche un message d'erreur\n                    formMessage.innerText = 'Identifiant ou mot de passe incorrect.';\n                }\n            } else if (xhr.status === 302) {\n                \/\/ V\u00e9rifie si la r\u00e9ponse contient 'success', indiquant une connexion r\u00e9ussie\n                if (xhr.responseText.indexOf('success') !== -1) {\n                                                            window.location.href = '\/en\/cv-library';\n                                    } else {\n                    \/\/ Affiche un message d'erreur\n                    formMessage.innerText = \"Incorrect username or password.'\";\n                }\n            } else {\n                \/\/ En cas d'erreur, affiche un message d'erreur\n                formMessage.innerText = \"Error during login. Please try again.\";\n            }\n        };\n        xhr.onerror = function () {\n            \/\/ En cas d'erreur, affiche un message d'erreur\n            formMessage.innerText = \"Error during login. Please try again.\";\n        };\n        xhr.send(formData);\n    });\n<\/script>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-2371","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ccchampdemars.com\/en\/wp-json\/wp\/v2\/pages\/2371","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ccchampdemars.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ccchampdemars.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ccchampdemars.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ccchampdemars.com\/en\/wp-json\/wp\/v2\/comments?post=2371"}],"version-history":[{"count":11,"href":"https:\/\/www.ccchampdemars.com\/en\/wp-json\/wp\/v2\/pages\/2371\/revisions"}],"predecessor-version":[{"id":2844,"href":"https:\/\/www.ccchampdemars.com\/en\/wp-json\/wp\/v2\/pages\/2371\/revisions\/2844"}],"wp:attachment":[{"href":"https:\/\/www.ccchampdemars.com\/en\/wp-json\/wp\/v2\/media?parent=2371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}