{"id":52,"date":"2024-05-01T18:12:58","date_gmt":"2024-05-01T16:12:58","guid":{"rendered":"https:\/\/otgranada.es\/?page_id=52"},"modified":"2024-05-19T21:02:29","modified_gmt":"2024-05-19T19:02:29","slug":"tipo-de-reserva","status":"publish","type":"page","link":"https:\/\/otgranada.es\/en_gb\/tipo-de-reserva\/","title":{"rendered":"Tipo de reserva"},"content":{"rendered":"<div class=\"wp-block-uagb-image aligncenter uagb-block-298f05db wp-block-uagb-image--layout-default wp-block-uagb-image--effect-static wp-block-uagb-image--align-center\" id=\"img-logo\"><figure class=\"wp-block-uagb-image__figure\"><img decoding=\"async\" data-srcset=\"https:\/\/otgranada.es\/wp-content\/uploads\/logo_elcortijo-1024x1024.png ,https:\/\/otgranada.es\/wp-content\/uploads\/logo_elcortijo.png 780w, https:\/\/otgranada.es\/wp-content\/uploads\/logo_elcortijo.png 360w\" data-sizes=\"(max-width: 480px) 150px\" data-src=\"https:\/\/otgranada.es\/wp-content\/uploads\/logo_elcortijo-1024x1024.png\" alt=\"\" class=\"uag-image-41 lazyload\" width=\"120\" height=\"120\" title=\"logo_elcortijo\" role=\"img\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 120px; --smush-placeholder-aspect-ratio: 120\/120;\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-cover alignfull is-light\" style=\"min-height:300px;aspect-ratio:unset;\" id=\"img-header\"><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim-0 has-background-dim\" style=\"background-color:#828ea2\"><\/span><img decoding=\"async\" class=\"wp-block-cover__image-background wp-image-25 lazyload\" alt=\"\" data-src=\"https:\/\/otgranada.es\/wp-content\/uploads\/seccion-inicio.jpg\" data-object-fit=\"cover\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" \/><div class=\"wp-block-cover__inner-container is-layout-constrained wp-block-cover-is-layout-constrained\">\n<h1 class=\"wp-block-heading has-text-align-center titulo-pagina has-white-color has-text-color has-link-color wp-elements-47758dcf6b67bfce6a5958d81e64d42f\" style=\"font-size:70px\"><strong>Reservation details<\/strong><\/h1>\n<\/div><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wpcf7 no-js\" id=\"wpcf7-f20-o1\" lang=\"es-ES\" dir=\"ltr\" data-wpcf7-id=\"20\">\n<div class=\"screen-reader-response\"><p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><\/p> <ul><\/ul><\/div>\n<form action=\"\/en_gb\/wp-json\/wp\/v2\/pages\/52#wpcf7-f20-o1\" method=\"post\" class=\"wpcf7-form init\" aria-label=\"Formulario de contacto\" novalidate=\"novalidate\" data-status=\"init\" data-trp-original-action=\"\/en_gb\/wp-json\/wp\/v2\/pages\/52#wpcf7-f20-o1\">\n<fieldset class=\"hidden-fields-container\"><input type=\"hidden\" name=\"_wpcf7\" value=\"20\" \/><input type=\"hidden\" name=\"_wpcf7_version\" value=\"6.1.1\" \/><input type=\"hidden\" name=\"_wpcf7_locale\" value=\"es_ES\" \/><input type=\"hidden\" name=\"_wpcf7_unit_tag\" value=\"wpcf7-f20-o1\" \/><input type=\"hidden\" name=\"_wpcf7_container_post\" value=\"0\" \/><input type=\"hidden\" name=\"_wpcf7_posted_data_hash\" value=\"\" \/><input type=\"hidden\" name=\"redirect_nonce\" value=\"89986ccf47\" \/><input type=\"hidden\" name=\"wpcf7cfpdf_hidden_name\" value=\"document-pdf\" \/><input type=\"hidden\" name=\"wpcf7cfpdf_hidden_reference\" value=\"12df5716\" \/><input type=\"hidden\" name=\"wpcf7cfpdf_hidden_date\" value=\"11252026\" \/><input type=\"hidden\" name=\"_wpcf7_recaptcha_response\" value=\"\" \/>\n<\/fieldset>\n<section class=\"section\">\n\t<p class=\"nota costeadicional\">The fields marked with an asterisk (*) are mandatory.\n\t<\/p>\n\t<div class=\"fila_a\">\n\t\t<p><label class=\"label\"> Full name*<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-name\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required\" id=\"nombre\" autocomplete=\"name\" aria-required=\"true\" aria-invalid=\"false\" value=\"\" type=\"text\" name=\"your-name\" \/><\/span> <\/label>\n\t\t<\/p>\n\t\t<p><label class=\"label\"> Number of guests*<br \/>\n<span class=\"wpcf7-form-control-wrap dsm-contact-form-7-select\" data-name=\"Nhuespedes\"><select class=\"wpcf7-form-control wpcf7-select wpcf7-validates-as-required et_pb_contact_select input\" id=\"Nhuespedes\" aria-required=\"true\" aria-invalid=\"false\" name=\"Nhuespedes\"><option value=\"2\">2<\/option><option value=\"3\">3<\/option><option value=\"4\">4<\/option><option value=\"5\">5<\/option><option value=\"6\">6<\/option><option value=\"7\">7<\/option><option value=\"8\">8<\/option><option value=\"9\">9<\/option><option value=\"10\">10<\/option><option value=\"11\">11<\/option><option value=\"12\">12<\/option><\/select><\/span> <\/label>\n\t\t<\/p>\n\t<\/div>\n\t<div class=\"fila_b\">\n\t\t<p><label class=\"label\"> Choose the room type, you can select more than one. <\/label><br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"habitaciones\"><span class=\"wpcf7-form-control wpcf7-checkbox wpcf7-validates-as-required\" id=\"habitaciones\"><span class=\"wpcf7-list-item first\"><label><input type=\"checkbox\" name=\"habitaciones[]\" value=\"Habitaci\u00f3n con cama de matrimonio I con cuarto de ba\u00f1o privado(max. 2 personas).\" \/><span class=\"wpcf7-list-item-label\">Room with queen-size bed and private bathroom (max. 2 people).<\/span><\/label><\/span><span class=\"wpcf7-list-item\"><label><input type=\"checkbox\" name=\"habitaciones[]\" value=\"Habitaci\u00f3n con cama de matrimonio II(max. 2 personas).\" \/><span class=\"wpcf7-list-item-label\">Room with queen-size bed II (max. 2 people).<\/span><\/label><\/span><span class=\"wpcf7-list-item\"><label><input type=\"checkbox\" name=\"habitaciones[]\" value=\"Habitaci\u00f3n con cama de matrimonio III(max. 2 personas).\" \/><span class=\"wpcf7-list-item-label\">Room with queen-size bed III (max. 2 people).<\/span><\/label><\/span><span class=\"wpcf7-list-item\"><label><input type=\"checkbox\" name=\"habitaciones[]\" value=\"Habitaci\u00f3n con dos camas sencillas(max. 2 personas).\" \/><span class=\"wpcf7-list-item-label\">Room with two single beds (max. 2 people).<\/span><\/label><\/span><span class=\"wpcf7-list-item\"><label><input type=\"checkbox\" name=\"habitaciones[]\" value=\"Habitaci\u00f3n con dos camas sencilla y litera(max. 4 personas).\" \/><span class=\"wpcf7-list-item-label\">Room with two single beds and bunk bed (max. 4 people).<\/span><\/label><\/span><span class=\"wpcf7-list-item last\"><label><input type=\"checkbox\" name=\"habitaciones[]\" value=\"Solo zona exterior.\" \/><span class=\"wpcf7-list-item-label\">Outdoor area only.<\/span><\/label><\/span><\/span><\/span>\n\t\t<\/p>\n\t<\/div>\n\t<div class=\"fila_c\">\n\t\t<p><label class=\"label\"> Additional conditions, arrival and departure time. <\/label>\n\t\t<\/p>\n\t\t<p class=\"nota\">Ask about changing the arrival and departure times, subject to availability and additional costs.\n\t\t<\/p>\n\t\t<p><span class=\"wpcf7-form-control-wrap\" data-name=\"condLlegadaPartida\"><span class=\"wpcf7-form-control wpcf7-checkbox wpcf7-validates-as-required\" id=\"condLlegadaPartida\"><span class=\"wpcf7-list-item first\"><label><input type=\"checkbox\" name=\"condLlegadaPartida[]\" value=\"Entrar antes de las 04:00pm\" \/><span class=\"wpcf7-list-item-label\">Arrival before 4:00 PM.<\/span><\/label><\/span><span class=\"wpcf7-list-item last\"><label><input type=\"checkbox\" name=\"condLlegadaPartida[]\" value=\"Salir despu\u00e9s de las 11:00am\" \/><span class=\"wpcf7-list-item-label\">Departure after 11:00am<\/span><\/label><\/span><\/span><\/span>\n\t\t<\/p>\n\t<\/div>\n\t<p><label class=\"label\"> Feel free to provide any additional comments (optional).<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"mensaje\"><textarea cols=\"40\" rows=\"10\" maxlength=\"2000\" class=\"wpcf7-form-control wpcf7-textarea\" id=\"mensaje\" aria-invalid=\"false\" name=\"mensaje\"><\/textarea><\/span> <\/label>\n\t<\/p>\n<\/section>\n<p><button class=\"wpcf7-form-control wpcf7-submit has-spinner et_pb_button et_pb_bg_layout_light\" type=\"submit\" value=\"Enviar\">Submit<\/button>\n<\/p><div class=\"wpcf7-response-output\" aria-hidden=\"true\"><\/div>\n<input type=\"hidden\" name=\"trp-form-language\" value=\"en_gb\"\/><\/form>\n<\/div>\n\n\n\n\n<script type=\"text\/javascript\">\n    document.addEventListener(\"DOMContentLoaded\", function() {\n    \n    const checkboxes = document.querySelectorAll('span.wpcf7-list-item input[type=\"checkbox\"]');\n    const soloZonaExteriorCheckbox = checkboxes[5];\n    const habitacion1Checkbox = checkboxes[0];\n    const habitacion2Checkbox = checkboxes[1];\n    const habitacion3Checkbox = checkboxes[2];\n    const habitacion4Checkbox = checkboxes[3];\n    const habitacion5Checkbox = checkboxes[4];\n    const huespedesSelect = document.getElementById('Nhuespedes');\n    let numeroHuespedes = 2;\n    let sumaCamas = 0;\n    var continua = 1;\n\n         \n    huespedesSelect.addEventListener('change', function(){\n        numeroHuespedes = huespedesSelect.value;\n    });\n    \/*function nuevoelemento() {\n      var escribirSpan = document.querySelector('[data-name=\"habitaciones\"]');\n      escribirSpan.innerHTML += \"<p>Personas: \"+ sumaCamas+\"<\/p>\";\n      }*\/\n          \n    habitacion1Checkbox.addEventListener('change', function() {\n        if (this.checked) {\n          sumaCamas += 2;        \n\n          comprobarHuespedCama(this);                                        \n        }else{\n            sumaCamas += -2;\n        }      \n\n\n    });    habitacion2Checkbox.addEventListener('change', function() {\n        if (this.checked) {\n            sumaCamas += 2; \n\n            comprobarHuespedCama(this);\n        }else{\n            sumaCamas += -2;\n        }\n\n\n    });    habitacion3Checkbox.addEventListener('change', function() {\n        if (this.checked) {\n            sumaCamas += 2; \n\n            comprobarHuespedCama(this);\n            \n        }else{\n            sumaCamas += -2;\n        }\n\n\n    });    habitacion4Checkbox.addEventListener('change', function() {\n        if (this.checked) {\n            sumaCamas += 2; \n\n            comprobarHuespedCama(this);\n        }else{\n            sumaCamas += -2;\n        }\n\n\n    });    habitacion5Checkbox.addEventListener('change', function() {\n        if (this.checked) {\n            sumaCamas += 4; \n\n            comprobarHuespedCama(this);\n        }else{\n            sumaCamas += -4;\n        }\n\n\n    });       \n    \n    \/\/ al clicar aqui\"\n    soloZonaExteriorCheckbox.addEventListener('change', function() {\n    \n        \/\/ Obtener todos los checkboxes de habitaciones\n        var habitacionesCheckboxes = document.querySelectorAll('input[name=\"habitaciones[]\"]');\n    \n    \n        \/\/ Verificar si el checkbox est\u00e1 marcado\n        if (this.checked) {\n            \n            \/\/ Iterar sobre cada checkbox\n            habitacionesCheckboxes.forEach(function(checkbox) {\n                \/\/ Verificar si el checkbox no es el de \"Solo zona exterior.\"\n                if (checkbox !== soloZonaExteriorCheckbox) {\n                    \/\/ Desmarcar el checkbox\n                    checkbox.checked = false;\n                    checkbox.disabled = true;\n                }\n            });\n        }else{\n            habitacionesCheckboxes.forEach(function(checkbox) {\n                \/\/ Verificar si el checkbox no es el de \"Solo zona exterior.\"\n                if (checkbox !== soloZonaExteriorCheckbox) {\n                    \/\/ Desmarcar el checkbox\n                    checkbox.disabled = false;\n                }\n            });\n            habitacion1Checkbox.checked = true;\n            sumaCamas = 2;\n        }\n    \n    });\n    \n    function mostrarModal(mensaje) {\n      var modal = document.getElementById(\"msnModal\");\n      var mensajeModal = document.getElementById(\"mensajeModal\");\n\n      \/\/ Mostrar el mensaje en el modal\n      mensajeModal.textContent = mensaje;\n\n      \/\/ Mostrar el modal\n      modal.style.display = \"block\";\n\n      \/\/ Asociar evento de clic al bot\u00f3n \"Aceptar\"\n      var btnAceptar = document.querySelector('.btn-accept');\n      var btnCloce = document.querySelector('.close');\n      btnAceptar.addEventListener('click', cerrarModal);\n      btnCloce.addEventListener('click', cerrarModal);\n  }\n      \n      \/\/ Funci\u00f3n para cerrar la ventana modal\n  function cerrarModal() {\n      var modal = document.getElementById('msnModal');\n      modal.style.display = 'none'; \/\/ Ocultar la ventana modal\n  }\n          \n  \/\/          console.log(\"entra: h:\"+ numeroHuespedes +\" c: \"+ sumaCamas );\n  function comprobarHuespedCama(checkbox){\n        if (numeroHuespedes < sumaCamas){ \/\/si los huespedes son menores que la cantidad permitida por cuarto\n                       \n            console.log(\"entro\");\n\n            const condiciones = {\n                3: 4,\n                5: 6,\n                7: 8,\n                9: 10,\n                11: 12\n            };\n\n            const condicionCumplida = condiciones[numeroHuespedes] === sumaCamas;\n\n            console.log(condicionCumplida); \n\n            if (condicionCumplida === true){\n                return;\n            }else{            \n                mostrarModal('Selecciona el n\u00famero adecuado de habitaciones para tus hu\u00e9spedes \"' + numeroHuespedes + '\". Si necesitas m\u00e1s, podemos ajustarlo con un costo adicional para garantizar tu comodidad. \u00a1Cont\u00e1ctanos para m\u00e1s detalles!');\n                \/\/alert(\"El n\u00famero de hu\u00e9spedes sobrepasa el total de camas disponibles.\");\n                checkbox.checked = false;\n                if (checkbox !== habitacion5Checkbox){sumaCamas += -2}\/\/sino es la habitacion ultima vale 4\n                else{sumaCamas += -4}\n            }\n        }         \n  }\n\n});\n<\/script>","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_uag_custom_page_level_css":".site-header, .entry-header{display: none}\n\n#img-header{\n\tmargin-top: 0px;\n}\n#img-logo{margin: 0 auto;}\n\n#wpcf7-f20-p52-o1{margin: 0 auto;}\n\n.section{\n\tfont-family: system-ui;\n}.label{\n\tcolor: #767676;\n\tfont-weight: 700;\n}\n\n#mensaje{\n\theight: 6em;\n}\n\n#nombre{width: 100%}\n.nota{\n\tfont-size: 18px;\n\tcolor: darkcyan;\n}\n#habitaciones{\n\tdisplay: flex;\n\tflex-direction: column;\n}#habitaciones &gt; spam{\n\tcolumn-gap:8px;\n}\n.titulo-pagina &gt; h1{box-shadow: 8px 7px 6px 0px #000000a6;}\n\n.fila_c p{margin: 0px;}","footnotes":""},"class_list":["post-52","page","type-page","status-publish","hentry"],"acf":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false,"et-pb-post-main-image":false,"et-pb-post-main-image-fullwidth":false,"et-pb-portfolio-image":false,"et-pb-portfolio-module-image":false,"et-pb-portfolio-image-single":false,"et-pb-gallery-module-image-portrait":false,"et-pb-post-main-image-fullwidth-large":false,"et-pb-image--responsive--desktop":false,"et-pb-image--responsive--tablet":false,"et-pb-image--responsive--phone":false},"uagb_author_info":{"display_name":"OT Granada","author_link":"https:\/\/otgranada.es\/en_gb\/author\/control\/"},"uagb_comment_info":0,"uagb_excerpt":null,"_links":{"self":[{"href":"https:\/\/otgranada.es\/en_gb\/wp-json\/wp\/v2\/pages\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otgranada.es\/en_gb\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/otgranada.es\/en_gb\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/otgranada.es\/en_gb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/otgranada.es\/en_gb\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":189,"href":"https:\/\/otgranada.es\/en_gb\/wp-json\/wp\/v2\/pages\/52\/revisions"}],"predecessor-version":[{"id":297,"href":"https:\/\/otgranada.es\/en_gb\/wp-json\/wp\/v2\/pages\/52\/revisions\/297"}],"wp:attachment":[{"href":"https:\/\/otgranada.es\/en_gb\/wp-json\/wp\/v2\/media?parent=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}