{"id":17303,"date":"2025-01-14T10:09:29","date_gmt":"2025-01-14T10:09:29","guid":{"rendered":"https:\/\/eduarabian.edu.ps\/?page_id=17303"},"modified":"2025-01-15T12:01:44","modified_gmt":"2025-01-15T12:01:44","slug":"%d8%b7%d9%84%d8%a8-%d8%a7%d9%84%d8%aa%d8%ad%d8%a7%d9%82","status":"publish","type":"page","link":"https:\/\/eduarabian.edu.ps\/ar\/%d8%b7%d9%84%d8%a8-%d8%a7%d9%84%d8%aa%d8%ad%d8%a7%d9%82\/","title":{"rendered":"\u0637\u0644\u0628 \u0627\u0644\u062a\u062d\u0627\u0642"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"17303\" class=\"elementor elementor-17303\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a91f196 e-flex e-con-boxed e-con e-parent\" data-id=\"a91f196\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3db226e elementor-widget elementor-widget-html\" data-id=\"3db226e\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"application-type\">\r\n    <!-- Step 1: Select Application Type -->\r\n    <div class=\"step-selection\">\r\n      <label class=\"step-label\">\u0627\u062e\u062a\u0631 \u0646\u0648\u0639 \u0627\u0644\u0637\u0644\u0628:<\/label>\r\n      <div class=\"radio-group\">\r\n        <label class=\"radio-item\">\r\n          <input type=\"radio\" name=\"applicationType\" value=\"regular\" onchange=\"handleApplicationTypeChange()\" checked> \u0645\u0646\u062a\u0638\u0645\r\n        <\/label>\r\n        <label class=\"radio-item\">\r\n          <input type=\"radio\" name=\"applicationType\" value=\"new-student\" onchange=\"handleApplicationTypeChange()\"> \u0637\u0627\u0644\u0628 \u062c\u062f\u064a\u062f\r\n        <\/label>\r\n      <\/div>\r\n    <\/div>\r\n  \r\n    <!-- Step 2: Select Section -->\r\n    <div id=\"sectionSelection\" class=\"step-section\" style=\"display: block; margin-top: 20px;\">\r\n      <label class=\"step-label\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0642\u0633\u0645:<\/label>\r\n      <div class=\"radio-group\">\r\n        <label class=\"radio-item\">\r\n          <input type=\"radio\" name=\"sectionType\" value=\"kindergarten\" onchange=\"handleSectionTypeChange()\"> \u0627\u0644\u0631\u0648\u0636\u0629\r\n        <\/label>\r\n        <label class=\"radio-item\">\r\n          <input type=\"radio\" name=\"sectionType\" value=\"school\" onchange=\"handleSectionTypeChange()\" checked> \u0627\u0644\u0645\u062f\u0631\u0633\u0629\r\n        <\/label>\r\n        <label class=\"radio-item\">\r\n          <input type=\"radio\" name=\"sectionType\" value=\"sat\" onchange=\"handleSectionTypeChange()\"> \u0627\u0644\u0633\u0627\u062a\r\n        <\/label>\r\n      <\/div>\r\n    <\/div>\r\n  \r\n    <!-- Step 3: Display Form -->\r\n    <div id=\"formPlaceholder\" style=\"margin-top: 20px; display: block;\"><\/div>\r\n  <\/div>\r\n  \r\n  <script>\r\n    \/\/ Initialize the form and section on page load\r\n    document.addEventListener(\"DOMContentLoaded\", function () {\r\n      handleApplicationTypeChange();\r\n      handleSectionTypeChange();\r\n    });\r\n  \r\n    \/\/ Handle application type changes\r\n    function handleApplicationTypeChange() {\r\n      const selectedType = document.querySelector('input[name=\"applicationType\"]:checked');\r\n      const sectionSelection = document.getElementById('sectionSelection');\r\n      if (selectedType) {\r\n        sectionSelection.style.display = 'block';\r\n      }\r\n    }\r\n  \r\n    \/\/ Handle section type changes and load the corresponding form\r\n    function handleSectionTypeChange() {\r\n      const applicationType = document.querySelector('input[name=\"applicationType\"]:checked')?.value;\r\n      const sectionType = document.querySelector('input[name=\"sectionType\"]:checked')?.value;\r\n      const formPlaceholder = document.getElementById('formPlaceholder');\r\n  \r\n      if (!applicationType || !sectionType) {\r\n        formPlaceholder.innerHTML = `<p class=\"form-error\">\u064a\u0631\u062c\u0649 \u0627\u062e\u062a\u064a\u0627\u0631 \u0646\u0648\u0639 \u0627\u0644\u0637\u0644\u0628 \u0648\u0627\u0644\u0642\u0633\u0645 \u0628\u0634\u0643\u0644 \u0635\u062d\u064a\u062d.<\/p>`;\r\n        return;\r\n      }\r\n  \r\n      formPlaceholder.style.display = 'block';\r\n  \r\n      if (sectionType === 'kindergarten' && applicationType === 'regular') {\r\n        loadKindergartenForm();\r\n      } else if (sectionType === 'school' && applicationType === 'regular') {\r\n        loadSchoolForm();\r\n      } else {\r\n        formPlaceholder.innerHTML = `<p class=\"form-error\">\u0627\u0644\u0642\u0633\u0645 \u0627\u0644\u0645\u062e\u062a\u0627\u0631 \u063a\u064a\u0631 \u0645\u062a\u0627\u062d \u062d\u0627\u0644\u064a\u064b\u0627.<\/p>`;\r\n      }\r\n    }\r\n  \r\n    \/\/ Load the kindergarten form\r\n    function loadKindergartenForm() {\r\n      document.getElementById('formPlaceholder').innerHTML = `\r\n        <h2 class=\"form-heading\">\u0637\u0644\u0628 \u0627\u0644\u062a\u062d\u0627\u0642 \u0645\u0646\u062a\u0638\u0645 - \u0627\u0644\u0631\u0648\u0636\u0629<\/h2>\r\n        <form id=\"kindergartenForm\" method=\"POST\" action=\"<?php echo admin_url('admin-post.php'); ?>\">\r\n          <input type=\"hidden\" name=\"action\" value=\"submit_application_form\">\r\n          <input type=\"hidden\" name=\"form_type\" value=\"kindergarten\">\r\n          ${getStudentInformation()}\r\n          ${getParentInformation()}\r\n          ${getEmergencyContact()}\r\n          ${getSiblingInformation()}\r\n          <div class=\"form-row\">\r\n            <button type=\"submit\" class=\"form-submit\">\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0637\u0644\u0628<\/button>\r\n          <\/div>\r\n        <\/form>\r\n      `;\r\n    }\r\n  \r\n    \/\/ Load the school form\r\n    function loadSchoolForm() {\r\n      document.getElementById('formPlaceholder').innerHTML = `\r\n        <h2 class=\"form-heading\">\u0637\u0644\u0628 \u0627\u0644\u062a\u062d\u0627\u0642 \u0645\u0646\u062a\u0638\u0645 - \u0627\u0644\u0645\u062f\u0631\u0633\u0629<\/h2>\r\n        <form id=\"schoolForm\">\r\n          ${getStudentInformation()}\r\n          ${getParentInformation()}\r\n          ${getEmergencyContact()}\r\n          ${getSiblingInformation()}\r\n          <div class=\"form-row\">\r\n            <button type=\"submit\" class=\"form-submit\">\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0637\u0644\u0628<\/button>\r\n          <\/div>\r\n        <\/form>\r\n      `;\r\n    }\r\n  \r\n    function getStudentInformation() {\r\n    return `\r\n      <fieldset>\r\n        <legend>\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0637\u0627\u0644\u0628<\/legend>\r\n        <table class=\"styled-table\">\r\n          <thead>\r\n            <tr>\r\n              <th>\u0627\u0644\u062d\u0642\u0644<\/th>\r\n              <th>\u0627\u0644\u0628\u064a\u0627\u0646 (\u0639\u0631\u0628\u064a)<\/th>\r\n              <th>\u0627\u0644\u0628\u064a\u0627\u0646 (English)<\/th>\r\n            <\/tr>\r\n          <\/thead>\r\n          <tbody>\r\n            <tr>\r\n              <td>\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0644:<\/td>\r\n              <td><input type=\"text\" placeholder=\"\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0623\u0648\u0644 \u0628\u0627\u0644\u0639\u0631\u0628\u064a\u0629\" required><\/td>\r\n              <td><input type=\"text\" placeholder=\"First Name in English\" required><\/td>\r\n            <\/tr>\r\n            <tr>\r\n              <td>\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u062b\u0627\u0646\u064a:<\/td>\r\n              <td><input type=\"text\" placeholder=\"\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u062b\u0627\u0646\u064a \u0628\u0627\u0644\u0639\u0631\u0628\u064a\u0629\" required><\/td>\r\n              <td><input type=\"text\" placeholder=\"Second Name in English\" required><\/td>\r\n            <\/tr>\r\n            <tr>\r\n              <td>\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u062b\u0627\u0644\u062b:<\/td>\r\n              <td><input type=\"text\" placeholder=\"\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u062b\u0627\u0644\u062b \u0628\u0627\u0644\u0639\u0631\u0628\u064a\u0629\" required><\/td>\r\n              <td><input type=\"text\" placeholder=\"Third Name in English\" required><\/td>\r\n            <\/tr>\r\n            <tr>\r\n              <td>\u0627\u0644\u0639\u0627\u0626\u0644\u0629:<\/td>\r\n              <td><input type=\"text\" placeholder=\"\u0627\u0633\u0645 \u0627\u0644\u0639\u0627\u0626\u0644\u0629 \u0628\u0627\u0644\u0639\u0631\u0628\u064a\u0629\" required><\/td>\r\n              <td><input type=\"text\" placeholder=\"Family Name in English\" required><\/td>\r\n            <\/tr>\r\n          <\/tbody>\r\n        <\/table>\r\n        <div class=\"form-row\">\r\n          <div class=\"form-grid\">\r\n            <div>\r\n              <label>\u0627\u0644\u0635\u0641 \u0627\u0644\u0645\u0646\u0648\u064a \u0627\u0644\u0627\u0644\u062a\u062d\u0627\u0642 \u0628\u0647:<\/label>\r\n              <select required>\r\n                <option value=\"\" disabled selected>\u0627\u062e\u062a\u0631 \u0627\u0644\u0635\u0641<\/option>\r\n                <option value=\"\u062a\u0645\u0647\u064a\u062f\u064a\">\u062a\u0645\u0647\u064a\u062f\u064a<\/option>\r\n                <option value=\"\u0628\u0633\u062a\u0627\u0646\">\u0628\u0633\u062a\u0627\u0646<\/option>\r\n              <\/select>\r\n            <\/div>\r\n            <div>\r\n              <label>\u062a\u0627\u0631\u064a\u062e \u062a\u0642\u062f\u064a\u0645 \u0627\u0644\u0637\u0644\u0628:<\/label>\r\n              <input type=\"date\" value=\"${new Date().toISOString().split('T')[0]}\" readonly>\r\n            <\/div>\r\n          <\/div>\r\n        <\/div>\r\n        <div class=\"form-row\">\r\n          <label>\u0627\u0644\u0639\u0646\u0648\u0627\u0646:<\/label>\r\n          <input type=\"text\" placeholder=\"\u0623\u062f\u062e\u0644 \u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0628\u0627\u0644\u062a\u0641\u0635\u064a\u0644\" required>\r\n        <\/div>\r\n      <\/fieldset>\r\n    `;\r\n  }\r\n  \r\n  \r\n  \r\n  \r\n    \/\/ Generate the parent information section\r\n    function getParentInformation() {\r\n      return `\r\n        <fieldset>\r\n          <legend>\u0628\u064a\u0627\u0646\u0627\u062a \u0648\u0644\u064a \u0627\u0644\u0623\u0645\u0631<\/legend>\r\n          <table class=\"styled-table\">\r\n            <thead>\r\n              <tr>\r\n                <th>\u0627\u0644\u062d\u0642\u0644<\/th>\r\n                <th>\u0627\u0644\u0623\u0628<\/th>\r\n                <th>\u0627\u0644\u0623\u0645<\/th>\r\n              <\/tr>\r\n            <\/thead>\r\n            <tbody>\r\n              <tr>\r\n                <td>\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0631\u0628\u0627\u0639\u064a:<\/td>\r\n                <td><input type=\"text\" placeholder=\"\u0627\u0633\u0645 \u0627\u0644\u0623\u0628\" required><\/td>\r\n                <td><input type=\"text\" placeholder=\"\u0627\u0633\u0645 \u0627\u0644\u0623\u0645\" required><\/td>\r\n              <\/tr>\r\n              <tr>\r\n                <td>\u0631\u0642\u0645 \u0627\u0644\u0647\u0648\u064a\u0629:<\/td>\r\n                <td><input type=\"text\" placeholder=\"\u0631\u0642\u0645 \u0627\u0644\u0647\u0648\u064a\u0629\" required><\/td>\r\n                <td><input type=\"text\" placeholder=\"\u0631\u0642\u0645 \u0627\u0644\u0647\u0648\u064a\u0629\" required><\/td>\r\n              <\/tr>\r\n              <tr>\r\n                <td>\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0643\u0646 \u0628\u0627\u0644\u062a\u0641\u0635\u064a\u0644:<\/td>\r\n                <td><input type=\"text\" placeholder=\"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0643\u0646\" required><\/td>\r\n                <td><input type=\"text\" placeholder=\"\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0633\u0643\u0646\" required><\/td>\r\n              <\/tr>\r\n              <tr>\r\n                <td>\u0631\u0642\u0645 \u0627\u0644\u062c\u0648\u0627\u0644:<\/td>\r\n                <td><input type=\"tel\" placeholder=\"\u0631\u0642\u0645 \u0627\u0644\u062c\u0648\u0627\u0644\" required><\/td>\r\n                <td><input type=\"tel\" placeholder=\"\u0631\u0642\u0645 \u0627\u0644\u062c\u0648\u0627\u0644\" required><\/td>\r\n              <\/tr>\r\n              <tr>\r\n                <td>\u0627\u0644\u0648\u0638\u064a\u0641\u0629:<\/td>\r\n                <td><input type=\"text\" placeholder=\"\u0648\u0638\u064a\u0641\u0629 \u0627\u0644\u0623\u0628\" required><\/td>\r\n                <td><input type=\"text\" placeholder=\"\u0648\u0638\u064a\u0641\u0629 \u0627\u0644\u0623\u0645\" required><\/td>\r\n              <\/tr>\r\n            <\/tbody>\r\n          <\/table>\r\n        <\/fieldset>\r\n      `;\r\n    }\r\n  \r\n    \/\/ Generate the emergency contact section\r\n    function getEmergencyContact() {\r\n      return `\r\n        <fieldset>\r\n          <legend>\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0637\u0631\u0641 \u0627\u0644\u062b\u0627\u0644\u062b \u0641\u064a \u062d\u0627\u0644\u0629 \u0627\u0644\u0637\u0648\u0627\u0631\u0626<\/legend>\r\n          <div class=\"form-row\">\r\n            <label>\u0627\u0633\u0645 \u0627\u0644\u0634\u062e\u0635:<\/label>\r\n            <input type=\"text\" placeholder=\"\u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0643\u0627\u0645\u0644\">\r\n          <\/div>\r\n          <div class=\"form-row\">\r\n            <label>\u0635\u0644\u0629 \u0627\u0644\u0642\u0631\u0627\u0628\u0629:<\/label>\r\n            <input type=\"text\" placeholder=\"\u0635\u0644\u0629 \u0627\u0644\u0642\u0631\u0627\u0628\u0629\">\r\n          <\/div>\r\n          <div class=\"form-row\">\r\n            <label>\u0631\u0642\u0645 \u0627\u0644\u062c\u0648\u0627\u0644:<\/label>\r\n            <input type=\"tel\" placeholder=\"\u0631\u0642\u0645 \u0627\u0644\u062c\u0648\u0627\u0644\">\r\n          <\/div>\r\n          <div class=\"form-row\">\r\n            <label>\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0628\u0627\u0644\u062a\u0641\u0635\u064a\u0644:<\/label>\r\n            <textarea placeholder=\"\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u0643\u0627\u0645\u0644\"><\/textarea>\r\n          <\/div>\r\n        <\/fieldset>\r\n      `;\r\n    }\r\n  \r\n    \/\/ Generate the sibling information section with a default of 2 siblings\r\n    function getSiblingInformation() {\r\n      return `\r\n        <fieldset>\r\n          <legend>\u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0625\u062e\u0648\u0629 \u0648\u0627\u0644\u0623\u062e\u0648\u0627\u062a<\/legend>\r\n          <div class=\"form-row\">\r\n            <label>\u0639\u062f\u062f \u0627\u0644\u0625\u062e\u0648\u0629:<\/label>\r\n            <select id=\"siblingsCount\" onchange=\"updateSiblingRows()\">\r\n              <option value=\"\" disabled>\u0627\u062e\u062a\u0631 \u0627\u0644\u0639\u062f\u062f<\/option>\r\n              <option value=\"0\">0<\/option>\r\n              <option value=\"1\">1<\/option>\r\n              <option value=\"2\" selected>2<\/option>\r\n              <option value=\"3\">3<\/option>\r\n              <option value=\"4\">4<\/option>\r\n              <option value=\"5\">5<\/option>\r\n            <\/select>\r\n          <\/div>\r\n          <div class=\"form-row\">\r\n            <table id=\"siblingsTable\" class=\"styled-table\">\r\n              <thead>\r\n                <tr>\r\n                  <th>\u0627\u0644\u0627\u0633\u0645<\/th>\r\n                  <th>\u0627\u0644\u0639\u0645\u0631<\/th>\r\n                  <th>\u0627\u0644\u0635\u0641<\/th>\r\n                  <th>\u0627\u0644\u0645\u062f\u0631\u0633\u0629<\/th>\r\n                <\/tr>\r\n              <\/thead>\r\n              <tbody id=\"siblingsTableBody\"><\/tbody>\r\n            <\/table>\r\n          <\/div>\r\n        <\/fieldset>\r\n      `;\r\n    }\r\n\r\n document.addEventListener(\"DOMContentLoaded\", function () {\r\n  \/\/ Trigger the sibling count update initially with 2 as default\r\n  const siblingsCountSelect = document.getElementById('siblingsCount');\r\n  siblingsCountSelect.value = \"2\"; \/\/ Set default value to 2\r\n  updateSiblingRows(); \/\/ Update rows based on the default value\r\n});\r\n\r\nfunction updateSiblingRows() {\r\n  const siblingsCount = parseInt(document.getElementById('siblingsCount').value, 10);\r\n  const siblingsTable = document.getElementById('siblingsTable');\r\n  const siblingsTableBody = document.getElementById('siblingsTableBody');\r\n\r\n  siblingsTableBody.innerHTML = '';\r\n  siblingsTable.style.display = siblingsCount > 0 ? 'table' : 'none';\r\n\r\n  for (let i = 1; i <= siblingsCount; i++) {\r\n    const row = document.createElement('tr');\r\n    row.innerHTML = `\r\n      <td><input type=\"text\" placeholder=\"\u0627\u0633\u0645 \u0627\u0644\u0623\u062e\/\u0627\u0644\u0623\u062e\u062a\" required><\/td>\r\n      <td><input type=\"number\" placeholder=\"\u0627\u0644\u0639\u0645\u0631\" min=\"0\" required><\/td>\r\n      <td><input type=\"text\" placeholder=\"\u0627\u0644\u0635\u0641\" required><\/td>\r\n      <td><input type=\"text\" placeholder=\"\u0627\u0644\u0645\u062f\u0631\u0633\u0629\" required><\/td>\r\n    `;\r\n    siblingsTableBody.appendChild(row);\r\n  }\r\n}\r\n\r\n  \r\n  \r\n  <\/script>\r\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>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u0627\u062e\u062a\u0631 \u0646\u0648\u0639 \u0627\u0644\u0637\u0644\u0628: \u0645\u0646\u062a\u0638\u0645 \u0637\u0627\u0644\u0628 \u062c\u062f\u064a\u062f \u0627\u062e\u062a\u0631 \u0627\u0644\u0642\u0633\u0645: \u0627\u0644\u0631\u0648\u0636\u0629 \u0627\u0644\u0645\u062f\u0631\u0633\u0629 \u0627\u0644\u0633\u0627\u062a<\/p>\n","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ngg_post_thumbnail":0,"footnotes":""},"class_list":["post-17303","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/eduarabian.edu.ps\/ar\/wp-json\/wp\/v2\/pages\/17303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eduarabian.edu.ps\/ar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/eduarabian.edu.ps\/ar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/eduarabian.edu.ps\/ar\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/eduarabian.edu.ps\/ar\/wp-json\/wp\/v2\/comments?post=17303"}],"version-history":[{"count":0,"href":"https:\/\/eduarabian.edu.ps\/ar\/wp-json\/wp\/v2\/pages\/17303\/revisions"}],"wp:attachment":[{"href":"https:\/\/eduarabian.edu.ps\/ar\/wp-json\/wp\/v2\/media?parent=17303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}