{"id":5567,"date":"2024-07-02T12:05:21","date_gmt":"2024-07-02T11:05:21","guid":{"rendered":"https:\/\/renfrewshirecarers.org.uk\/?page_id=5567"},"modified":"2025-03-27T09:10:39","modified_gmt":"2025-03-27T09:10:39","slug":"carers-discount-card-application","status":"publish","type":"page","link":"https:\/\/renfrewshirecarers.org.uk\/ar\/carers-discount-card-application\/","title":{"rendered":"\u0637\u0644\u0628 \u0628\u0637\u0627\u0642\u0629 \u062e\u0635\u0645 \u0645\u0642\u062f\u0645\u064a \u0627\u0644\u0631\u0639\u0627\u064a\u0629"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"5567\" class=\"elementor elementor-5567\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-94c3269 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"94c3269\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-90dc129\" data-id=\"90dc129\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ad48cbd eael-dual-header-content-align-center elementor-widget elementor-widget-eael-dual-color-header\" data-id=\"ad48cbd\" data-element_type=\"widget\" data-widget_type=\"eael-dual-color-header.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t<div class=\"eael-dual-header\">\n\t\t\t\t<h2 class=\"title\"><span class=\"lead solid-color\">\u0628\u0637\u0627\u0642\u0629 \u062e\u0635\u0645 \u0645\u0642\u062f\u0645\u064a \u0627\u0644\u0631\u0639\u0627\u064a\u0629<\/span> <span>\u0637\u0644\u0628 <\/span><\/h2><div class=\"eael-dch-separator-wrap\"><span class=\"separator-one\"><\/span>\n\t\t\t<span class=\"separator-two\"><\/span><\/div>\t\t\t\t<span class=\"subtext\"><p>\u064a\u0631\u062c\u0649 \u0645\u0644\u0621 \u0627\u0644\u0646\u0645\u0648\u0630\u062c \u0623\u062f\u0646\u0627\u0647\u00a0<\/p><\/span>\n\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-452e0bb9 elementor-section-full_width elementor-section-stretched elementor-section-height-default elementor-section-height-default\" data-id=\"452e0bb9\" data-element_type=\"section\" data-settings=\"{&quot;stretch_section&quot;:&quot;section-stretched&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5ed8a628\" data-id=\"5ed8a628\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2b5d9ffb elementor-widget elementor-widget-text-editor\" data-id=\"2b5d9ffb\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<style>\/*! elementor - v3.22.0 - 26-06-2024 *\/\n.elementor-widget-text-editor.elementor-drop-cap-view-stacked .elementor-drop-cap{background-color:#69727d;color:#fff}.elementor-widget-text-editor.elementor-drop-cap-view-framed .elementor-drop-cap{color:#69727d;border:3px solid;background-color:transparent}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap{margin-top:8px}.elementor-widget-text-editor:not(.elementor-drop-cap-view-default) .elementor-drop-cap-letter{width:1em;height:1em}.elementor-widget-text-editor .elementor-drop-cap{float:left;text-align:center;line-height:1;font-size:50px}.elementor-widget-text-editor .elementor-drop-cap-letter{display:inline-block}<\/style>\t\t\t\t    <form id=\"carers_card_form\" enctype=\"multipart\/form-data\" style=\"max-width: 500px;\" action=\"\">\n        <input type=\"hidden\" id=\"carers_card_nonce\" name=\"carers_card_nonce\" value=\"14df2c7f07\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/ar\/wp-json\/wp\/v2\/pages\/5567\" \/>\n        <label>\u0647\u0644 \u0623\u0646\u062a \u0645\u0642\u062f\u0645 \u0631\u0639\u0627\u064a\u0629 \u063a\u064a\u0631 \u0645\u062f\u0641\u0648\u0639 \u0627\u0644\u0623\u062c\u0631 \u062a\u0639\u064a\u0634 \u0641\u064a \u0631\u064a\u0646\u0641\u0631\u0648\u0634\u0627\u064a\u0631\u061f<\/label>\n        <div style=\"display: flex; align-items: center; gap: 20px; margin-bottom: 10px;\">\n            <label style=\"display: flex; align-items: center; gap: 5px;\">\n                \u0646\u0639\u0645 <input type=\"radio\" name=\"resident\" value=\"yes\" id=\"resident_yes\" required>\n            <\/label>\n            <label style=\"display: flex; align-items: center; gap: 5px;\">\n                \u0644\u0627 <input type=\"radio\" name=\"resident\" value=\"no\" id=\"resident_no\" required>\n            <\/label>\n        <\/div>\n\n        <div id=\"declined_message\" style=\"display: none; color: red; margin-top: 10px;\">\n            \u0644\u0644\u0623\u0633\u0641\u060c \u064a\u062c\u0628 \u0623\u0646 \u062a\u0643\u0648\u0646 \u0645\u0642\u062f\u0645 \u0631\u0639\u0627\u064a\u0629 \u063a\u064a\u0631 \u0645\u062f\u0641\u0648\u0639 \u0627\u0644\u0623\u062c\u0631 \u0648\u062a\u0642\u064a\u0645 \u0641\u064a \u0631\u064a\u0646\u0641\u0631\u0648\u0634\u0627\u064a\u0631 \u0644\u0644\u062a\u0642\u062f\u0645 \u0628\u0637\u0644\u0628 \u0644\u0644\u062d\u0635\u0648\u0644 \u0639\u0644\u0649 \u0628\u0637\u0627\u0642\u0629 \u062e\u0635\u0645 \u0645\u0642\u062f\u0645\u064a \u0627\u0644\u0631\u0639\u0627\u064a\u0629. \u0644\u0623\u064a \u0627\u0633\u062a\u0641\u0633\u0627\u0631\u0627\u062a\u060c \u064a\u064f\u0631\u062c\u0649 \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0641\u0631\u064a\u0642 \u0627\u0644\u0639\u0637\u0644\u0627\u062a \u0627\u0644\u0642\u0635\u064a\u0631\u0629 \u0639\u0644\u0649 \u0627\u0644\u0631\u0642\u0645 <strong>0141 887 3643<\/strong> \u0623\u0648 \u0631\u0627\u0633\u0644\u0646\u0627 \u0639\u0644\u0649 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a \n            <a href=\"mailto:shortbreaks@renfrewshire.org.uk\">shortbreaks@renfrewshire.org.uk<\/a>.\n        <\/div>\n\n        <label>\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0643\u0627\u0645\u0644<\/label>\n        <input type=\"text\" name=\"full_name\" required onblur=\"this.value = this.value.replace(\/\\b\\w\/g, function(l) { return l.toUpperCase(); });\">\n\n        <label>\u0639\u0646\u0648\u0627\u0646<\/label>\n        <input type=\"text\" name=\"address\" required>\n\n        <label>\u0634\u0641\u0631\u0629 \u0627\u0644\u0628\u0631\u064a\u062f<\/label>\n        <input type=\"text\" name=\"postcode\" required>\n\n        <label>\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062a\u0641 \u0627\u0644\u0645\u062d\u0645\u0648\u0644<\/label>\n        <input type=\"text\" name=\"mobile\" id=\"mobile\">\n\n        <label>\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062a\u0641 \u0627\u0644\u0623\u0631\u0636\u064a<\/label>\n        <input type=\"text\" name=\"landline\" id=\"landline\">\n\n        <label>\u062a\u0627\u0631\u064a\u062e \u0627\u0644\u0645\u064a\u0644\u0627\u062f<\/label>\n        <input type=\"date\" name=\"dob\" required>\n\n        <label>\u0628\u0631\u064a\u062f \u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a<\/label>\n        <input type=\"email\" name=\"email\" required>\n\n        <hr style=\"margin: 20px 0; border: 0; border-top: 1px solid #ccc;\">\n        <h3 style=\"margin-bottom: 5px;\">\u062a\u0641\u0627\u0635\u064a\u0644 \u0627\u0644\u0623\u0634\u062e\u0627\u0635 \u0627\u0644\u0630\u064a\u0646 \u062a\u0647\u062a\u0645 \u0628\u0647\u0645:<\/h3>\n\n        <label>\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0643\u0627\u0645\u0644 \u0644\u0644\u0634\u062e\u0635 \u0627\u0644\u0630\u064a \u062a\u062a\u0645 \u0631\u0639\u0627\u064a\u062a\u0647<\/label>\n        <input type=\"text\" name=\"cared_for_name\" required>\n\n        <label>\u062a\u0627\u0631\u064a\u062e \u0645\u064a\u0644\u0627\u062f \u0627\u0644\u0634\u062e\u0635 \u0627\u0644\u0630\u064a \u062a\u062a\u0645 \u0631\u0639\u0627\u064a\u062a\u0647<\/label>\n        <input type=\"date\" name=\"cared_for_dob\" required>\n\n        <!-- CHANGED: label only; and made optional to avoid blocking -->\n        <label>\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0631\u0639\u0627\u064a\u0629<\/label>\n        <input type=\"text\" name=\"cared_for_address\" placeholder=\"\u0627\u062a\u0631\u0643\u0647 \u0641\u0627\u0631\u063a\u064b\u0627 \u0625\u0630\u0627 \u0643\u0627\u0646 \u0646\u0641\u0633 \u0627\u0644\u062d\u0642\u0644 \u0627\u0644\u062e\u0627\u0635 \u0628\u0643\">\n\n        <label>\u0631\u0639\u0627\u064a\u0629 \u0627\u0644\u0645\u0631\u0636\/\u0627\u0644\u0625\u0639\u0627\u0642\u0629<\/label>\n        <input type=\"text\" name=\"cared_for_condition\" required>\n\n        <label>\u0643\u064a\u0641 \u0633\u0645\u0639\u062a \u0639\u0646\u0627\u061f<\/label>\n        <select name=\"how_heard\" required>\n            <option value=\"Google\">\u062c\u0648\u062c\u0644<\/option>\n            <option value=\"Social media\">\u0648\u0633\u0627\u0626\u0644 \u0627\u0644\u062a\u0648\u0627\u0635\u0644 \u0627\u0644\u0627\u062c\u062a\u0645\u0627\u0639\u064a<\/option>\n            <option value=\"E-bulletin\">\u0627\u0644\u0646\u0634\u0631\u0629 \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a\u0629<\/option>\n            <option value=\"Posters, flyers and\/or leaflets\">\u0627\u0644\u0645\u0644\u0635\u0642\u0627\u062a \u0648\u0627\u0644\u0645\u0646\u0634\u0648\u0631\u0627\u062a \u0648\/\u0623\u0648 \u0627\u0644\u0643\u062a\u064a\u0628\u0627\u062a<\/option>\n            <option value=\"Information Stands\">\u0623\u0643\u0634\u0627\u0643 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a<\/option>\n            <option value=\"Group sessions\">\u062c\u0644\u0633\u0627\u062a \u062c\u0645\u0627\u0639\u064a\u0629<\/option>\n            <option value=\"Short Breaks\">\u0641\u062a\u0631\u0627\u062a \u0631\u0627\u062d\u0629 \u0642\u0635\u064a\u0631\u0629<\/option>\n            <option value=\"Family and Friends\">\u0627\u0644\u0639\u0627\u0626\u0644\u0629 \u0648\u0627\u0644\u0623\u0635\u062f\u0642\u0627\u0621<\/option>\n            <option value=\"Renfrewshire Carers Centre Website\">\u0645\u0648\u0642\u0639 \u0645\u0631\u0643\u0632 \u0645\u0642\u062f\u0645\u064a \u0627\u0644\u0631\u0639\u0627\u064a\u0629 \u0641\u064a \u0631\u064a\u0646\u0641\u0631\u0648\u0634\u0627\u064a\u0631<\/option>\n            <option value=\"None of the Above\">\u0644\u0627 \u0634\u064a\u0621 \u0645\u0645\u0627 \u0633\u0628\u0642<\/option>\n        <\/select>\n\n        <label>\u062a\u062d\u0645\u064a\u0644 \u0635\u0648\u0631\u0629 \u0639\u0644\u0649 \u063a\u0631\u0627\u0631 \u062c\u0648\u0627\u0632 \u0627\u0644\u0633\u0641\u0631<\/label>\n        <p style=\"font-size: 0.9em; color: #555;\">\u064a\u0631\u062c\u0649 \u062a\u062d\u0645\u064a\u0644 \u0635\u0648\u0631\u0629 \u0623\u0645\u0627\u0645\u064a\u0629 \u0648\u0627\u0636\u062d\u0629. \u0633\u062a\u062a\u0645\u0643\u0646 \u0645\u0646 \u0642\u0635\u0647\u0627 \u0644\u062a\u0646\u0627\u0633\u0628 \u0634\u0643\u0644 \u062c\u0648\u0627\u0632 \u0627\u0644\u0633\u0641\u0631 \u0628\u0639\u062f \u0627\u0644\u062a\u062d\u0645\u064a\u0644.<\/p>\n        <input type=\"file\" name=\"photo\" id=\"photo-input\" accept=\"image\/*\" required>\n\n        <!-- Crop UI (your original) -->\n        <div id=\"image-cropper-container\" style=\"display:none;margin:12px 0;\">\n            <div id=\"image-preview-container\" style=\"max-width:100%;\"><\/div>\n            <div style=\"display:flex;gap:8px;margin-top:10px;\">\n                <button type=\"button\" id=\"rotate-button\" class=\"button\" style=\"background-color:#2196F3;color:#fff;\">\u062a\u0646\u0627\u0648\u0628<\/button>\n                <button type=\"button\" id=\"crop-button\" class=\"button\" style=\"background-color:#ff9800;color:#fff;\">\u0627\u0642\u062a\u0635\u0627\u0635<\/button>\n            <\/div>\n        <\/div>\n\n        <div id=\"cropped-image-container\" style=\"display:none;margin:12px 0;\">\n            <img decoding=\"async\" class=\"lazyload\" id=\"cropped-image-preview\" src=\"data:image\/gif;base64,R0lGODlhAQABAIAAAAAAAP\/\/\/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\" data-src=\"\" style=\"max-width:100%;border:1px solid #ddd;border-radius:8px;\"\/><noscript><img decoding=\"async\" class=\"lazyload\" id=\"cropped-image-preview\" src=\"\" style=\"max-width:100%;border:1px solid #ddd;border-radius:8px;\"\/><\/noscript>\n            <div style=\"margin-top:10px;\">\n                <button type=\"button\" id=\"recrop-button\" class=\"button\" style=\"background-color:#9c27b0;color:#fff;\">\u0625\u0639\u0627\u062f\u0629 \u0627\u0644\u0642\u0635<\/button>\n            <\/div>\n        <\/div>\n        <input type=\"hidden\" id=\"cropped-photo-data\" value=\"\">\n\n        <div style=\"display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px;\">\n            <input type=\"checkbox\" name=\"agree\" id=\"agree\" style=\"width: 5%;\" required>\n            <label for=\"agree\" style=\"margin: 0; flex-grow: 1;\">\u0623\u0648\u0627\u0641\u0642 \u0639\u0644\u0649 \u0627\u0644\u0634\u0631\u0648\u0637.<\/label>\n        <\/div>\n\n        <button type=\"submit\" id=\"submit-button\">\u064a\u064f\u0642\u062f\u0651\u0650\u0645<\/button>\n\n        <div id=\"carers_response\"><\/div>\n\n        <!-- Thank You popup: clearer, shows reference -->\n        <div id=\"thank-you-popup\" style=\"display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);            background: #ffffff; border: 3px solid #8e2f8f; padding: 30px; z-index: 9999;            box-shadow: 0 10px 30px rgba(0,0,0,0.2); border-radius: 16px; max-width: 90%; text-align: center; font-family: inherit;\">\n            <h2 style=\"margin-bottom: 10px; color: #8e2f8f;\">\u062a\u0645 \u0627\u0633\u062a\u0644\u0627\u0645 \u0627\u0644\u0637\u0644\u0628<\/h2>\n            <p style=\"font-size: 1.1em; color: #333;\">\u0645\u0631\u062c\u0639: <strong id=\"rcdc-ref\"><\/strong><\/p>\n            <p style=\"font-size: 1.0em; color: #333;\">\u0644\u0648 \u0633\u0645\u062d\u062a <strong>\u0644\u0627 \u062a\u0639\u064a\u062f \u0627\u0644\u0625\u0631\u0633\u0627\u0644<\/strong>\u0644\u0642\u062f \u0623\u0631\u0633\u0644\u0646\u0627 \u0644\u0643 \u0631\u0633\u0627\u0644\u0629 \u062a\u0623\u0643\u064a\u062f \u0639\u0628\u0631 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a.<\/p>\n            <button onclick=\"closeThankYouPopup()\" style=\"margin-top: 20px; background: #8e2f8f; color: #fff;                border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer;\">\u0646\u0639\u0645<\/button>\n        <\/div>\n    <input type=\"hidden\" name=\"trp-form-language\" value=\"ar\"\/><\/form>\n    <div id=\"carers_response\"><\/div>\n\n    <!-- Include Cropper.js -->\n    <link rel=\"stylesheet\" href=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/cropperjs\/1.5.12\/cropper.min.css\">\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/cropperjs\/1.5.12\/cropper.min.js\"><\/script>\n\n    <script>\n    document.addEventListener(\"DOMContentLoaded\", function() {\n        \/\/ Guard on re-opens within 10 minutes (soft visual)\n        const last = Number(localStorage.getItem('carers_card_recent_submit') || 0);\n        if (Date.now() - last < 10 * 60 * 1000) {\n            const f = document.getElementById('carers_card_form');\n            if (f) f.style.opacity = 0.6;\n        }\n\n        \/\/ Handle resident radios\n        const radios = document.getElementsByName(\"resident\");\n        const declinedMessage = document.getElementById(\"declined_message\");\n        const form = document.getElementById(\"carers_card_form\");\n        \n        radios.forEach(radio => {\n            radio.addEventListener(\"change\", function() {\n                declinedMessage.style.display = (this.value === \"no\") ? \"block\" : \"none\";\n            });\n        });\n\n        \/\/ Phone validation + submit\n        const submitButton = document.getElementById(\"submit-button\");\n        form.addEventListener(\"submit\", function(event) {\n            event.preventDefault();\n            \n            const mobile = document.getElementById(\"mobile\").value.trim();\n            const landline = document.getElementById(\"landline\").value.trim();\n\n            if (!mobile && !landline) {\n                alert(\"Please enter either a Mobile Number or a Landline Number.\");\n                return;\n            }\n            \n            if (!document.getElementById(\"cropped-photo-data\").value) {\n                alert(\"Please upload and crop your photo before submitting.\");\n                return;\n            }\n            \n            submitForm();\n        });\n\n        \/\/ Image cropping\n        let cropper;\n        const photoInput = document.getElementById(\"photo-input\");\n        const imagePreviewContainer = document.getElementById(\"image-preview-container\");\n        const imageCropperContainer = document.getElementById(\"image-cropper-container\");\n        const croppedImageContainer = document.getElementById(\"cropped-image-container\");\n        const croppedImagePreview = document.getElementById(\"cropped-image-preview\");\n        const croppedPhotoData = document.getElementById(\"cropped-photo-data\");\n        const cropButton = document.getElementById(\"crop-button\");\n        const recropButton = document.getElementById(\"recrop-button\");\n        const rotateButton = document.getElementById(\"rotate-button\");\n        \n        photoInput.addEventListener(\"change\", function(event) {\n            if (event.target.files && event.target.files[0]) {\n                const file = event.target.files[0];\n                const reader = new FileReader();\n                \n                reader.onload = function(e) {\n                    imagePreviewContainer.innerHTML = \"\";\n                    const img = document.createElement(\"img\");\n                    img.id = \"image-preview\";\n                    img.src = e.target.result;\n                    img.style.maxWidth = \"100%\";\n                    imagePreviewContainer.appendChild(img);\n                    \n                    if (cropper) {\n                        cropper.destroy();\n                    }\n                    \n                    imageCropperContainer.style.display = \"block\";\n                    croppedImageContainer.style.display = \"none\";\n                    \n                    setTimeout(() => {\n                        cropper = new Cropper(img, {\n                            aspectRatio: 4\/5,\n                            viewMode: 1,\n                            guides: true,\n                            background: false,\n                            autoCropArea: 0.8,\n                            responsive: true,\n                            zoomable: true,\n                            zoomOnWheel: false\n                        });\n                    }, 200);\n                };\n                \n                reader.readAsDataURL(file);\n            }\n        });\n        \n        if (rotateButton) {\n            rotateButton.addEventListener(\"click\", function() {\n                if (cropper) {\n                    cropper.rotate(90);\n                }\n            });\n        }\n        \n        if (cropButton) {\n            cropButton.addEventListener(\"click\", function() {\n                if (cropper) {\n                    const canvas = cropper.getCroppedCanvas({\n                        width: 200,\n                        height: 250,\n                        fillColor: '#fff',\n                        imageSmoothingEnabled: true,\n                        imageSmoothingQuality: 'high'\n                    });\n                    \n                    if (canvas) {\n                        croppedImagePreview.src = canvas.toDataURL(\"image\/jpeg\", 0.9);\n                        croppedPhotoData.value = canvas.toDataURL(\"image\/jpeg\", 0.9);\n                        imageCropperContainer.style.display = \"none\";\n                        croppedImageContainer.style.display = \"block\";\n                    }\n                }\n            });\n        }\n        \n        if (recropButton) {\n            recropButton.addEventListener(\"click\", function() {\n                imageCropperContainer.style.display = \"block\";\n                croppedImageContainer.style.display = \"none\";\n            });\n        }\n        \n        function submitForm() {\n            const responseElement = document.getElementById(\"carers_response\");\n            const form = document.getElementById(\"carers_card_form\");\n            \n            submitButton.disabled = true;\n            submitButton.textContent = \"Submitting...\";\n\n            responseElement.innerHTML = \"<div style='margin-top: 15px; padding: 10px; background-color: #f8f9fa; border-radius: 4px;'>Submitting your application, please wait...<\/div>\";\n            \n            const formData = new FormData(form);\n            formData.delete(\"photo\");\n            \n            const base64Data = document.getElementById(\"cropped-photo-data\").value;\n            if (base64Data) {\n                const base64Content = base64Data.split(',')[1];\n                const byteCharacters = atob(base64Content);\n                const byteArrays = [];\n                \n                for (let offset = 0; offset < byteCharacters.length; offset += 512) {\n                    const slice = byteCharacters.slice(offset, offset + 512);\n                    const byteNumbers = new Array(slice.length);\n                    for (let i = 0; i < slice.length; i++) {\n                        byteNumbers[i] = slice.charCodeAt(i);\n                    }\n                    const byteArray = new Uint8Array(byteNumbers);\n                    byteArrays.push(byteArray);\n                }\n                \n                const blob = new Blob(byteArrays, {type: 'image\/jpeg'});\n                const imageFile = new File([blob], \"passport_photo.jpg\", {type: 'image\/jpeg'});\n                formData.append('photo', imageFile);\n            }\n            \n            formData.append('action', 'carers_card_submission');\n            \n            fetch(ajax_object.ajax_url, {\n                method: 'POST',\n                body: formData,\n                credentials: 'same-origin'\n            })\n            .then(response => response.json())\n            .then(data => {\n                if (data.success) {\n                    \/\/ Show popup + reference and disable the entire form\n                    if (data.data && data.data.id) {\n                        const refEl = document.getElementById('rcdc-ref');\n                        if (refEl) refEl.textContent = '#' + data.data.id;\n                    }\n                    showThankYouPopup();\n                    Array.from(form.elements).forEach(el => el.disabled = true);\n                    localStorage.setItem('carers_card_recent_submit', String(Date.now()));\n\n                    responseElement.innerHTML = \n                        \"<div style='margin-top: 20px; padding: 15px; background-color: #e8f5e9; color: #1b5e20; border-radius: 5px;'>\" +\n                        (data.data?.message || \"Application submitted. Please check your email (including spam).\") +\n                        \"<\/div>\";\n                } else {\n                    responseElement.innerHTML = \n                        \"<div style='margin-top: 20px; padding: 15px; background-color: #f2dede; color: #a94442; border-radius: 5px;'>\" +\n                        (data.data?.message || \"There was an error processing your submission.\") +\n                        \"<\/div>\";\n                    submitButton.disabled = false;\n                    submitButton.textContent = \"Submit\";\n                }\n            })\n            .catch(error => {\n                console.error('Error:', error);\n                responseElement.innerHTML = \n                    \"<div style='margin-top: 20px; padding: 15px; background-color: #f2dede; color: #a94442; border-radius: 5px;'>\" +\n                    \"Error: Something went wrong. Please try again.\" +\n                    \"<\/div>\";\n                submitButton.disabled = false;\n                submitButton.textContent = \"Submit\";\n            });\n        }\n\n        window.showThankYouPopup = function() {\n            document.getElementById('thank-you-popup').style.display = 'block';\n            window.scrollTo({ top: 0, behavior: 'smooth' });\n        }\n\n        window.closeThankYouPopup = function() {\n            document.getElementById('thank-you-popup').style.display = 'none';\n        }\n    });\n    <\/script>\n\n    <style>\n        #carers_card_form label {\n            display: block;\n            margin-top: 10px;\n            font-weight: bold;\n        }\n        #carers_card_form input[type=\"text\"],\n        #carers_card_form input[type=\"email\"],\n        #carers_card_form input[type=\"date\"],\n        #carers_card_form select {\n            width: 100%;\n            padding: 8px;\n            margin-top: 5px;\n            margin-bottom: 10px;\n            border: 1px solid #ccc;\n            border-radius: 4px;\n            box-sizing: border-box;\n        }\n        #carers_card_form button {\n            background-color: #4CAF50;\n            color: white;\n            padding: 10px 15px;\n            margin-top: 15px;\n            border: none;\n            border-radius: 4px;\n            cursor: pointer;\n        }\n        #carers_card_form button:hover {\n            background-color: #45a049;\n        }\n        #rotate-button { background-color: #2196F3 !important; }\n        #crop-button { background-color: #ff9800 !important; }\n        #recrop-button { background-color: #9c27b0 !important; }\n    <\/style>\n    \t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>\u0637\u0644\u0628 \u0627\u0644\u062d\u0635\u0648\u0644 \u0639\u0644\u0649 \u0628\u0637\u0627\u0642\u0629 \u062e\u0635\u0645 \u0645\u0642\u062f\u0645\u064a \u0627\u0644\u0631\u0639\u0627\u064a\u0629 \u064a\u0631\u062c\u0649 \u0645\u0644\u0621 \u0627\u0644\u0646\u0645\u0648\u0630\u062c \u0623\u062f\u0646\u0627\u0647\u00a0<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"footnotes":"","_tec_slr_enabled":"","_tec_slr_layout":""},"class_list":["post-5567","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Carers Discount Card Application - Renfrewshire Carers Centre<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/renfrewshirecarers.org.uk\/ar\/carers-discount-card-application\/\" \/>\n<meta property=\"og:locale\" content=\"ar_AR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Carers Discount Card Application - Renfrewshire Carers Centre\" \/>\n<meta property=\"og:description\" content=\"Carers Discount Card Application Please fill out the form below\u00a0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/renfrewshirecarers.org.uk\/ar\/carers-discount-card-application\/\" \/>\n<meta property=\"og:site_name\" content=\"Renfrewshire Carers Centre\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RCarers\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-27T09:10:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/renfrewshirecarers.org.uk\/wp-content\/uploads\/2022\/03\/Renfrewshire-Carers-logo_landscape-1024x304-1-e1652098882696.png\" \/>\n\t<meta property=\"og:image:width\" content=\"929\" \/>\n\t<meta property=\"og:image:height\" content=\"250\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@Rcarers\" \/>\n<meta name=\"twitter:label1\" content=\"\u0648\u0642\u062a \u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u064f\u0642\u062f\u0651\u0631\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/\",\"url\":\"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/\",\"name\":\"Carers Discount Card Application - Renfrewshire Carers Centre\",\"isPartOf\":{\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/#website\"},\"datePublished\":\"2024-07-02T11:05:21+00:00\",\"dateModified\":\"2025-03-27T09:10:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/#breadcrumb\"},\"inLanguage\":\"ar\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/renfrewshirecarers.org.uk\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Carers Discount Card Application\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/#website\",\"url\":\"https:\/\/renfrewshirecarers.org.uk\/\",\"name\":\"Renfrewshire Carers Centre\",\"description\":\"Lifeline for Carers in Renfrewshire\",\"publisher\":{\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/renfrewshirecarers.org.uk\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ar\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/#organization\",\"name\":\"Renfrewshire Carers Centre\",\"url\":\"https:\/\/renfrewshirecarers.org.uk\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ar\",\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/renfrewshirecarers.org.uk\/wp-content\/uploads\/2022\/11\/circular-transparent-1.png\",\"contentUrl\":\"https:\/\/renfrewshirecarers.org.uk\/wp-content\/uploads\/2022\/11\/circular-transparent-1.png\",\"width\":755,\"height\":752,\"caption\":\"Renfrewshire Carers Centre\"},\"image\":{\"@id\":\"https:\/\/renfrewshirecarers.org.uk\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RCarers\",\"https:\/\/x.com\/Rcarers\",\"https:\/\/www.youtube.com\/user\/RenfrewshireCarers\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Carers Discount Card Application - Renfrewshire Carers Centre","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/renfrewshirecarers.org.uk\/ar\/carers-discount-card-application\/","og_locale":"ar_AR","og_type":"article","og_title":"Carers Discount Card Application - Renfrewshire Carers Centre","og_description":"Carers Discount Card Application Please fill out the form below\u00a0","og_url":"https:\/\/renfrewshirecarers.org.uk\/ar\/carers-discount-card-application\/","og_site_name":"Renfrewshire Carers Centre","article_publisher":"https:\/\/www.facebook.com\/RCarers","article_modified_time":"2025-03-27T09:10:39+00:00","og_image":[{"width":929,"height":250,"url":"https:\/\/renfrewshirecarers.org.uk\/wp-content\/uploads\/2022\/03\/Renfrewshire-Carers-logo_landscape-1024x304-1-e1652098882696.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@Rcarers","twitter_misc":{"\u0648\u0642\u062a \u0627\u0644\u0642\u0631\u0627\u0621\u0629 \u0627\u0644\u0645\u064f\u0642\u062f\u0651\u0631":"\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/","url":"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/","name":"Carers Discount Card Application - Renfrewshire Carers Centre","isPartOf":{"@id":"https:\/\/renfrewshirecarers.org.uk\/#website"},"datePublished":"2024-07-02T11:05:21+00:00","dateModified":"2025-03-27T09:10:39+00:00","breadcrumb":{"@id":"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/#breadcrumb"},"inLanguage":"ar","potentialAction":[{"@type":"ReadAction","target":["https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/renfrewshirecarers.org.uk\/carers-discount-card-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/renfrewshirecarers.org.uk\/"},{"@type":"ListItem","position":2,"name":"Carers Discount Card Application"}]},{"@type":"WebSite","@id":"https:\/\/renfrewshirecarers.org.uk\/#website","url":"https:\/\/renfrewshirecarers.org.uk\/","name":"Renfrewshire Carers Centre","description":"Lifeline for Carers in Renfrewshire","publisher":{"@id":"https:\/\/renfrewshirecarers.org.uk\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/renfrewshirecarers.org.uk\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ar"},{"@type":"Organization","@id":"https:\/\/renfrewshirecarers.org.uk\/#organization","name":"Renfrewshire Carers Centre","url":"https:\/\/renfrewshirecarers.org.uk\/","logo":{"@type":"ImageObject","inLanguage":"ar","@id":"https:\/\/renfrewshirecarers.org.uk\/#\/schema\/logo\/image\/","url":"https:\/\/renfrewshirecarers.org.uk\/wp-content\/uploads\/2022\/11\/circular-transparent-1.png","contentUrl":"https:\/\/renfrewshirecarers.org.uk\/wp-content\/uploads\/2022\/11\/circular-transparent-1.png","width":755,"height":752,"caption":"Renfrewshire Carers Centre"},"image":{"@id":"https:\/\/renfrewshirecarers.org.uk\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RCarers","https:\/\/x.com\/Rcarers","https:\/\/www.youtube.com\/user\/RenfrewshireCarers"]}]}},"ticketed":false,"_links":{"self":[{"href":"https:\/\/renfrewshirecarers.org.uk\/ar\/wp-json\/wp\/v2\/pages\/5567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/renfrewshirecarers.org.uk\/ar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/renfrewshirecarers.org.uk\/ar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/renfrewshirecarers.org.uk\/ar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/renfrewshirecarers.org.uk\/ar\/wp-json\/wp\/v2\/comments?post=5567"}],"version-history":[{"count":7,"href":"https:\/\/renfrewshirecarers.org.uk\/ar\/wp-json\/wp\/v2\/pages\/5567\/revisions"}],"predecessor-version":[{"id":6742,"href":"https:\/\/renfrewshirecarers.org.uk\/ar\/wp-json\/wp\/v2\/pages\/5567\/revisions\/6742"}],"wp:attachment":[{"href":"https:\/\/renfrewshirecarers.org.uk\/ar\/wp-json\/wp\/v2\/media?parent=5567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}