{"id":4768,"date":"2024-11-01T18:07:04","date_gmt":"2024-11-01T18:07:04","guid":{"rendered":"https:\/\/beams-experiments.com\/?page_id=4768"},"modified":"2024-11-01T18:39:26","modified_gmt":"2024-11-01T18:39:26","slug":"information-sheet-chatbot","status":"publish","type":"page","link":"https:\/\/beams-experiments.com\/index.php\/information-sheet-chatbot\/","title":{"rendered":"Information Sheet-Chatbot"},"content":{"rendered":"\n<!DOCTYPE html>\n<html>\n<head>\n    <title>Your Page Title<\/title>\n    <style>\n        #progressBarContainer {\n            width: 90%; \/* Full width of the container *\/\n            background-color: #e0e0e0; \/* Light grey background *\/\n            border-radius: 5px; \/* Rounded corners *\/\n            margin-top: 20px; \/* Space above the progress bar *\/\n        }\n\n        #progressBar {\n            height: 10px; \/* Height of the progress bar *\/\n            background-color: #007bff; \/* Blue progress bar *\/\n            border-radius: 5px; \/* Rounded corners *\/\n            width: 22%; \/* Represents the progress (2\/9 = 22%) *\/\n        }\n\n        #progressText {\n            text-align: center;\n            margin-top: 5px; \/* Space between the progress bar and the text *\/\n        }\n\n        #agreeButton {\n            display: block;\n            background-color: #007bff;\n            color: white;\n            padding: 10px 20px;\n            margin: 20px auto;\n            font-size: 16px;\n            border: none;\n            border-radius: 5px;\n            cursor: pointer;\n            \/* Initially disable the button *\/\n            opacity: 0.5;\n            cursor: not-allowed;\n        }\n    <\/style>\n    <script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.5.1\/jquery.min.js\"><\/script>\n    <script>\n        $(document).ready(function() {\n            \/\/alert('If you disagree with this page, you may close your browser and discontinue the experiment.');\n            $.ajax({\n                url: 'https:\/\/beams-experiments.com\/AI_HE\/chatbot\/getInformationSheet.php',\n                type: 'GET',\n                success: function(data) {\n                    var formattedData = formatTextToParagraphs(data);\n                    $('#result').html(formattedData);\n                },\n                error: function() {\n                    $('#result').html('Error loading data.');\n                }\n            });\n\n            function formatTextToParagraphs(text) {\n                var paragraphs = text.split(\/\\n+\/); \n                var formattedText = paragraphs.map(function(paragraph) {\n                    return '<p>' + paragraph + '<\/p>'; \n                }).join('');\n                return formattedText;\n            }\n\n            \/\/ Disable the button initially\n            $('#agreeButton').prop('disabled', true);\n\n            \/\/ Enable button when the \"I have read\" radio button is checked\n            $('input[name=\"readStatus\"]').on('change', function() {\n                if ($('#read').is(':checked')) {\n                    $('#agreeButton').prop('disabled', false);\n                    $('#agreeButton').css('opacity', '1');\n                    $('#agreeButton').css('cursor', 'pointer');\n                } else {\n                    $('#agreeButton').prop('disabled', true);\n                    $('#agreeButton').css('opacity', '0.5');\n                    $('#agreeButton').css('cursor', 'not-allowed');\n                }\n            });\n\n            $('#agreeButton').on('click', function() {\n                window.location.href = 'https:\/\/beams-experiments.com\/index.php\/informed-consent-chatbot\/';\n            });\n        });\n    <\/script>\n<\/head>\n<body>\n    <div id=\"result\">Loading data&#8230;<\/div>\n\n    <!-- Radio Buttons -->\n    <div>\n        <label>\n            <input type=\"radio\" name=\"readStatus\" id=\"notRead\" checked> I have not read this information sheet\n        <\/label>\n        <br>\n        <label>\n            <input type=\"radio\" name=\"readStatus\" id=\"read\"> I have read this information sheet\n        <\/label>\n    <\/div>\n\n    <!-- Agree & Continue Button -->\n    <button id=\"agreeButton\">Agree &#038; Continue<\/button>\n\n    <!-- Progress Bar -->\n    <div id=\"progressBarContainer\">\n        <div id=\"progressBar\"><\/div>\n    <\/div>\n    <div id=\"progressText\">Page 2 out of 6<\/div>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Your Page Title Loading data&#8230; I have not read this information sheet I have read this information sheet Agree &#038; Continue Page 2 out of 6<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"om_disable_all_campaigns":false,"footnotes":""},"class_list":["post-4768","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/4768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/comments?post=4768"}],"version-history":[{"count":4,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/4768\/revisions"}],"predecessor-version":[{"id":4779,"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/pages\/4768\/revisions\/4779"}],"wp:attachment":[{"href":"https:\/\/beams-experiments.com\/index.php\/wp-json\/wp\/v2\/media?parent=4768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}