{"id":7,"date":"2025-10-01T22:51:59","date_gmt":"2025-10-01T22:51:59","guid":{"rendered":"http:\/\/staging.swanstack.com.au\/?page_id=7"},"modified":"2025-10-01T22:51:59","modified_gmt":"2025-10-01T22:51:59","slug":"booking-form","status":"publish","type":"page","link":"https:\/\/staging.swanstack.com.au\/index.php\/booking-form\/","title":{"rendered":"Booking Form"},"content":{"rendered":"        <div class=\"gtp-login-form-container\">\r\n            <form id=\"gtp-custom-login-form\" class=\"gtp-login-form\" method=\"post\">\r\n                <h3>Login to Book Appointments<\/h3>\r\n                \r\n                <div class=\"gtp-form-field\">\r\n                    <label for=\"gtp_username\">Username or Email<\/label>\r\n                    <input type=\"text\" id=\"gtp_username\" name=\"username\" required \/>\r\n                <\/div>\r\n                \r\n                <div class=\"gtp-form-field\">\r\n                    <label for=\"gtp_password\">Password<\/label>\r\n                    <input type=\"password\" id=\"gtp_password\" name=\"password\" required \/>\r\n                <\/div>\r\n                \r\n                <div class=\"gtp-form-field\">\r\n                    <label>\r\n                        <input type=\"checkbox\" name=\"remember\" value=\"1\" \/>\r\n                        Remember Me                    <\/label>\r\n                <\/div>\r\n                \r\n                <div class=\"gtp-form-actions\">\r\n                    <button type=\"submit\" class=\"gtp-login-button\">\r\n                        Login                    <\/button>\r\n                <\/div>\r\n                \r\n                <input type=\"hidden\" name=\"action\" value=\"gtp_custom_login\" \/>\r\n                <input type=\"hidden\" name=\"redirect_to\" value=\"https:\/\/staging.swanstack.com.au\/index.php\/booking-form\/\" \/>\r\n                <input type=\"hidden\" name=\"nonce\" value=\"016f7f46fb\" \/>\r\n            <\/form>\r\n            \r\n            <div class=\"gtp-login-links\">\r\n                                <p><a href=\"https:\/\/staging.swanstack.com.au\/wp-login.php?action=lostpassword\">Lost Password?<\/a><\/p>\r\n            <\/div>\r\n            \r\n            <div id=\"gtp-login-messages\"><\/div>\r\n        <\/div>\r\n        \r\n        <style>\r\n        .gtp-login-form-container {\r\n            max-width: 400px;\r\n            margin: 20px auto;\r\n            padding: 30px;\r\n            border: 1px solid #ddd;\r\n            border-radius: 8px;\r\n            background: #fff;\r\n            box-shadow: 0 2px 4px rgba(0,0,0,0.1);\r\n        }\r\n        \r\n        .gtp-login-form h3 {\r\n            margin-top: 0;\r\n            text-align: center;\r\n            color: #333;\r\n        }\r\n        \r\n        .gtp-form-field {\r\n            margin-bottom: 20px;\r\n        }\r\n        \r\n        .gtp-form-field label {\r\n            display: block;\r\n            margin-bottom: 5px;\r\n            font-weight: bold;\r\n            color: #555;\r\n        }\r\n        \r\n        .gtp-form-field input[type=\"text\"],\r\n        .gtp-form-field input[type=\"email\"],\r\n        .gtp-form-field input[type=\"password\"] {\r\n            width: 100%;\r\n            padding: 10px;\r\n            border: 1px solid #ddd;\r\n            border-radius: 4px;\r\n            font-size: 16px;\r\n            box-sizing: border-box;\r\n        }\r\n        \r\n        .gtp-form-field input[type=\"checkbox\"] {\r\n            margin-right: 8px;\r\n        }\r\n        \r\n        .gtp-login-button {\r\n            width: 100%;\r\n            padding: 12px;\r\n            background: #0073aa;\r\n            color: white;\r\n            border: none;\r\n            border-radius: 4px;\r\n            font-size: 16px;\r\n            cursor: pointer;\r\n            transition: background 0.3s;\r\n        }\r\n        \r\n        .gtp-login-button:hover {\r\n            background: #005a87;\r\n        }\r\n        \r\n        .gtp-login-button:disabled {\r\n            background: #ccc;\r\n            cursor: not-allowed;\r\n        }\r\n        \r\n        .gtp-login-links {\r\n            text-align: center;\r\n            margin-top: 20px;\r\n        }\r\n        \r\n        .gtp-login-links p {\r\n            margin: 5px 0;\r\n        }\r\n        \r\n        .gtp-login-links a {\r\n            color: #0073aa;\r\n            text-decoration: none;\r\n        }\r\n        \r\n        .gtp-login-links a:hover {\r\n            text-decoration: underline;\r\n        }\r\n        \r\n        #gtp-login-messages {\r\n            margin-top: 20px;\r\n        }\r\n        \r\n        .gtp-message {\r\n            padding: 10px;\r\n            border-radius: 4px;\r\n            margin-bottom: 10px;\r\n        }\r\n        \r\n        .gtp-message.success {\r\n            background: #d4edda;\r\n            color: #155724;\r\n            border: 1px solid #c3e6cb;\r\n        }\r\n        \r\n        .gtp-message.error {\r\n            background: #f8d7da;\r\n            color: #721c24;\r\n            border: 1px solid #f5c6cb;\r\n        }\r\n        <\/style>\r\n        \r\n        <script>\r\n        jQuery(document).ready(function($) {\r\n            $('#gtp-custom-login-form').on('submit', function(e) {\r\n                e.preventDefault();\r\n                \r\n                var $form = $(this);\r\n                var $button = $form.find('.gtp-login-button');\r\n                var $messages = $('#gtp-login-messages');\r\n                \r\n                \/\/ Disable button and show loading\r\n                $button.prop('disabled', true).text('Logging in...');\r\n                $messages.empty();\r\n                \r\n                $.ajax({\r\n                    url: 'https:\/\/staging.swanstack.com.au\/wp-admin\/admin-ajax.php',\r\n                    type: 'POST',\r\n                    data: $form.serialize(),\r\n                    success: function(response) {\r\n                        if (response.success) {\r\n                            $messages.html('<div class=\"gtp-message success\">' + response.data.message + '<\/div>');\r\n                            \/\/ Redirect after successful login\r\n                            setTimeout(function() {\r\n                                window.location.href = response.data.redirect_url;\r\n                            }, 1000);\r\n                        } else {\r\n                            $messages.html('<div class=\"gtp-message error\">' + response.data + '<\/div>');\r\n                            $button.prop('disabled', false).text('Login');\r\n                        }\r\n                    },\r\n                    error: function() {\r\n                        $messages.html('<div class=\"gtp-message error\">An error occurred. Please try again.<\/div>');\r\n                        $button.prop('disabled', false).text('Login');\r\n                    }\r\n                });\r\n            });\r\n        });\r\n        <\/script>\r\n        \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":{"footnotes":""},"class_list":["post-7","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/staging.swanstack.com.au\/index.php\/wp-json\/wp\/v2\/pages\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.swanstack.com.au\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/staging.swanstack.com.au\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/staging.swanstack.com.au\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.swanstack.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":1,"href":"https:\/\/staging.swanstack.com.au\/index.php\/wp-json\/wp\/v2\/pages\/7\/revisions"}],"predecessor-version":[{"id":9,"href":"https:\/\/staging.swanstack.com.au\/index.php\/wp-json\/wp\/v2\/pages\/7\/revisions\/9"}],"wp:attachment":[{"href":"https:\/\/staging.swanstack.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}