{"id":439,"date":"2026-04-17T08:41:23","date_gmt":"2026-04-17T08:41:23","guid":{"rendered":"https:\/\/alrizqmortgage.com\/?page_id=439"},"modified":"2026-04-17T08:41:46","modified_gmt":"2026-04-17T08:41:46","slug":"agent-portal","status":"publish","type":"page","link":"https:\/\/alrizqmortgage.com\/ms\/agent-portal\/","title":{"rendered":"Agent Portal"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"439\" class=\"elementor elementor-439\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d0d0cfe e-flex e-con-boxed e-con e-parent\" data-id=\"d0d0cfe\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ca9a712 elementor-widget elementor-widget-map_agent_dashboard\" data-id=\"ca9a712\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"map_agent_dashboard.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"map-portal-login-container\">\n    <div class=\"map-portal-login-card\">\n\n        <!-- LOGIN PANEL -->\n        <div id=\"map-login-panel\">\n            <div class=\"map-portal-login-header\">\n                <h2>Agent Portal<\/h2>\n                <p>Sign in to your account<\/p>\n            <\/div>\n            <div class=\"map-form-group login-field\">\n                <label>Email Address<\/label>\n                <input type=\"email\" id=\"map-login-email\" placeholder=\"you@example.com\" autocomplete=\"email\" style=\"width:100%;\">\n            <\/div>\n            <div class=\"map-form-group login-field map-password-field\" style=\"margin-top:12px;\">\n                <label>Password<\/label>\n                <input type=\"password\" id=\"map-login-password\" placeholder=\"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\" autocomplete=\"current-password\" style=\"width:100%; padding-right:64px;\">\n                <button type=\"button\" id=\"map-pw-toggle\" class=\"map-password-toggle\" aria-label=\"Show password\" aria-pressed=\"false\">Show<\/button>\n            <\/div>\n            <div class=\"map-auth-row\">\n                <label class=\"map-auth-remember\">\n                    <input type=\"checkbox\" id=\"map-login-remember\"> Remember me\n                <\/label>\n                <button type=\"button\" id=\"map-show-forgot\" class=\"map-auth-link-btn\">Forgot password?<\/button>\n            <\/div>\n            <button type=\"button\" id=\"map-login-btn\" class=\"map-auth-primary-btn\">Sign In<\/button>\n            <div style=\"text-align:center; margin-top:14px; font-size:12px; color:var(--portal-soft-text,#6f7f86);\">\n                Never registered?\n                <a href=\"https:\/\/alrizqmortgage.com\/ms\/agent-registration\/\" style=\"color:var(--portal-primary,#1e3a5f); font-weight:700; text-decoration:underline;\">Register now<\/a>\n            <\/div>\n            <div id=\"map-login-msg\" style=\"margin-top:12px; font-size:13px; text-align:center; min-height:18px;\"><\/div>\n        <\/div>\n\n        <!-- FORGOT PASSWORD PANEL -->\n        <div id=\"map-forgot-panel\" style=\"display:none;\">\n            <div class=\"map-portal-login-header\">\n                <h2>Reset Password<\/h2>\n                <p>We'll send a reset link to your email<\/p>\n            <\/div>\n            <div class=\"map-form-group login-field\">\n                <label>Email Address<\/label>\n                <input type=\"email\" id=\"map-forgot-email\" placeholder=\"you@example.com\" style=\"width:100%;\">\n            <\/div>\n            <button type=\"button\" id=\"map-forgot-btn\" class=\"map-auth-primary-btn\">Send Reset Link<\/button>\n            <div id=\"map-forgot-msg\" style=\"margin-top:12px; font-size:13px; text-align:center; min-height:18px;\"><\/div>\n            <div style=\"text-align:center; margin-top:16px;\">\n                <button type=\"button\" id=\"map-show-login\" class=\"map-auth-link-btn\">\u2190 Back to Sign In<\/button>\n            <\/div>\n        <\/div>\n\n    <\/div>\n<\/div>\n<script>\n(function() {\n    \/* Self-contained login script with its own AJAX config.\n       Runs immediately after the HTML is in the DOM. *\/\n    var AJAX_URL   = 'https:\/\/alrizqmortgage.com\/wp-admin\/admin-ajax.php';\n    var AUTH_NONCE = 'fe8578ac2f';\n\n    function ready(fn) {\n        if (document.readyState !== 'loading') { fn(); }\n        else { document.addEventListener('DOMContentLoaded', fn); }\n    }\n\n    ready(function () {\n\n        \/* \u2500\u2500 Password toggle \u2500\u2500 *\/\n        var pwToggle = document.getElementById('map-pw-toggle');\n        var pwInput  = document.getElementById('map-login-password');\n        if (pwToggle && pwInput) {\n            pwToggle.addEventListener('click', function () {\n                var isHidden = pwInput.type === 'password';\n                pwInput.type = isHidden ? 'text' : 'password';\n                pwToggle.textContent = isHidden ? 'Hide' : 'Show';\n                pwToggle.setAttribute('aria-pressed', isHidden ? 'true' : 'false');\n                pwToggle.setAttribute('aria-label', isHidden ? 'Hide password' : 'Show password');\n            });\n        }\n\n        \/* \u2500\u2500 Panel switching \u2500\u2500 *\/\n        var loginPanel  = document.getElementById('map-login-panel');\n        var forgotPanel = document.getElementById('map-forgot-panel');\n        var showForgot  = document.getElementById('map-show-forgot');\n        var showLogin   = document.getElementById('map-show-login');\n\n        if (showForgot) showForgot.addEventListener('click', function () {\n            loginPanel.style.display  = 'none';\n            forgotPanel.style.display = '';\n        });\n        if (showLogin) showLogin.addEventListener('click', function () {\n            forgotPanel.style.display = 'none';\n            loginPanel.style.display  = '';\n        });\n\n        \/* \u2500\u2500 Login submit \u2500\u2500 *\/\n        function doLogin() {\n            var btn   = document.getElementById('map-login-btn');\n            var msg   = document.getElementById('map-login-msg');\n            var email = document.getElementById('map-login-email').value;\n            var pass  = document.getElementById('map-login-password').value;\n            var rem   = document.getElementById('map-login-remember').checked ? 1 : 0;\n\n            btn.disabled  = true;\n            btn.textContent = 'Signing in\u2026';\n            msg.style.color = '#666';\n            msg.textContent = '';\n\n            var xhr = new XMLHttpRequest();\n            xhr.open('POST', AJAX_URL, true);\n            xhr.setRequestHeader('Content-Type', 'application\/x-www-form-urlencoded');\n            xhr.onload = function () {\n                var res;\n                try { res = JSON.parse(xhr.responseText); } catch(e) { res = {success:false, data:'Server error.'}; }\n                if (res.success) {\n                    msg.style.color = 'green';\n                    msg.textContent = '\u2714 Signed in. Loading\u2026';\n                    setTimeout(function () {\n                        if (res.data && res.data.redirect) {\n                            window.location.href = res.data.redirect;\n                        } else {\n                            location.reload();\n                        }\n                    }, 800);\n                } else {\n                    btn.disabled = false;\n                    btn.textContent = 'Sign In';\n                    msg.style.color = '#e74c3c';\n                    msg.textContent = res.data || 'Login failed.';\n                }\n            };\n            xhr.onerror = function () {\n                btn.disabled = false;\n                btn.textContent = 'Sign In';\n                msg.style.color = '#e74c3c';\n                msg.textContent = 'Connection error. Please try again.';\n            };\n            xhr.send(\n                'action=map_agent_login'\n                + '&email=' + encodeURIComponent(email)\n                + '&password=' + encodeURIComponent(pass)\n                + '&remember=' + rem\n                + '&security=' + encodeURIComponent(AUTH_NONCE)\n            );\n        }\n\n        var loginBtn = document.getElementById('map-login-btn');\n        if (loginBtn) loginBtn.addEventListener('click', doLogin);\n\n        var emailInput = document.getElementById('map-login-email');\n        var passInput2 = document.getElementById('map-login-password');\n        function onEnter(e) { if (e.key === 'Enter' || e.keyCode === 13) doLogin(); }\n        if (emailInput) emailInput.addEventListener('keypress', onEnter);\n        if (passInput2) passInput2.addEventListener('keypress', onEnter);\n\n        \/* \u2500\u2500 Forgot password submit \u2500\u2500 *\/\n        var forgotBtn = document.getElementById('map-forgot-btn');\n        if (forgotBtn) {\n            forgotBtn.addEventListener('click', function () {\n                var btn   = this;\n                var msg   = document.getElementById('map-forgot-msg');\n                var email = document.getElementById('map-forgot-email').value;\n                btn.disabled = true;\n                btn.textContent = 'Sending\u2026';\n\n                var xhr2 = new XMLHttpRequest();\n                xhr2.open('POST', AJAX_URL, true);\n                xhr2.setRequestHeader('Content-Type', 'application\/x-www-form-urlencoded');\n                xhr2.onload = function () {\n                    var res;\n                    try { res = JSON.parse(xhr2.responseText); } catch(e) { res = {success:false, data:'Error.'}; }\n                    btn.disabled = false;\n                    btn.textContent = 'Send Reset Link';\n                    msg.style.color = res.success ? 'green' : '#e74c3c';\n                    msg.textContent = res.data || '';\n                };\n                xhr2.send(\n                    'action=map_agent_forgot_password'\n                    + '&email=' + encodeURIComponent(email)\n                    + '&security=' + encodeURIComponent(AUTH_NONCE)\n                );\n            });\n        }\n\n        \/* Keep shared AJAX config available for dashboard scripts after login. *\/\n        if (typeof window.map_dash_obj === 'undefined') {\n            window.map_dash_obj = {\n                ajax_url:   AJAX_URL,\n                nonce:      '1068d783d8',\n                auth_nonce: AUTH_NONCE\n            };\n        }\n    });\n})();\n<\/script>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Your account is pending approval by the IT Admin.<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-439","page","type-page","status-publish"],"_links":{"self":[{"href":"https:\/\/alrizqmortgage.com\/ms\/wp-json\/wp\/v2\/pages\/439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alrizqmortgage.com\/ms\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/alrizqmortgage.com\/ms\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/alrizqmortgage.com\/ms\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alrizqmortgage.com\/ms\/wp-json\/wp\/v2\/comments?post=439"}],"version-history":[{"count":4,"href":"https:\/\/alrizqmortgage.com\/ms\/wp-json\/wp\/v2\/pages\/439\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/alrizqmortgage.com\/ms\/wp-json\/wp\/v2\/pages\/439\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/alrizqmortgage.com\/ms\/wp-json\/wp\/v2\/media?parent=439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}