{"id":5386,"date":"2015-10-16T16:49:29","date_gmt":"2015-10-16T16:49:29","guid":{"rendered":"http:\/\/acropolishouse.gr\/form\/"},"modified":"2023-01-03T11:51:19","modified_gmt":"2023-01-03T11:51:19","slug":"form","status":"publish","type":"page","link":"https:\/\/acropolishouse.gr\/el\/form\/","title":{"rendered":"Form"},"content":{"rendered":"<div class=\"fusion-fullwidth fullwidth-box fusion-builder-row-1 nonhundred-percent-fullwidth non-hundred-percent-height-scrolling\" style=\"--awb-border-radius-top-left:0px;--awb-border-radius-top-right:0px;--awb-border-radius-bottom-right:0px;--awb-border-radius-bottom-left:0px;--awb-margin-top:50px;--awb-flex-wrap:wrap;\" ><div class=\"fusion-builder-row fusion-row\"><div class=\"fusion-layout-column fusion_builder_column fusion-builder-column-0 fusion_builder_column_1_1 1_1 fusion-one-full fusion-column-first fusion-column-last mainformbooking \" style=\"--awb-bg-size:cover;\"><div class=\"fusion-column-wrapper fusion-column-has-shadow fusion-flex-column-wrapper-legacy\">\n\n<!-- FORM -->\n\n\n      <script type=\"text\/javascript\" src=\"https:\/\/code.jquery.com\/jquery-1.10.2.js\"><\/script>\n      <script type=\"text\/javascript\" src=\"https:\/\/code.jquery.com\/ui\/1.11.4\/jquery-ui.js\"><\/script>\n      <link rel=\"stylesheet\" type=\"text\/css\" href=\"https:\/\/code.jquery.com\/ui\/1.11.4\/themes\/smoothness\/jquery-ui.css\">\n<style>\n.hoteligaForm,\ninput,\nbutton {\n    font-size: 16px;\n    font-family: Arial, Helvetica, sans-serif;\n}\n\ninput {\n    width: 100px;\n    text-align: center;\n}\n\n#searchBtn {\n    color: white;\n    background-color: blue;\n}\n\n\n<\/style>\n\n\n<div class=\"hoteligaForm\">\n    <label for=\"from\">\u0386\u03c6\u03b9\u03be\u03b7<\/label>\n    <input type=\"text\" id=\"from\" name=\"from\" \/>\n    <label for=\"to\">\u0391\u03bd\u03b1\u03c7\u03ce\u03c1\u03b7\u03c3\u03b7<\/label>\n    <input type=\"text\" id=\"to\" name=\"to\" \/>\n    <label for=\"promocode\">Promo code<\/label>\n    <input type=\"text\" id=\"promocode\" name=\"promocode\" \/>\n    <button id=\"searchBtn\">\u0388\u03bb\u03b5\u03b3\u03c7\u03bf\u03c2 \u0394\u03b9\u03b1\u03b8\u03b5\u03c3\u03b9\u03bc\u03cc\u03c4\u03b7\u03c4\u03b1\u03c2<\/button>\n<\/div>\n\n\n<script>var minArrivalOffset = 1; \/\/ minimum days ahead that one can book\nvar minStayDays = 1; \/\/ minimum stay in days at hotel\nvar maxStayDays = 31; \/\/ maximum stay in days at hotel\nvar numberOfMonths = 1; \/\/ how many months to display in pop-up calendar\nvar dateFormat = 'd\/m\/yy'; \/\/ or yy-mm-dd\nvar domain = 'demohoteliga'; \/\/ your hoteliga domain here\n\n\/\/ helper function that returns a date in the future based on days offset\nfunction getOffsetDate(dateRel, offset) {\n    if (dateRel == null) dateRel = new Date();\n    return new Date(dateRel.getFullYear(), dateRel.getMonth(), dateRel.getDate() + offset);\n}\n\n\/\/ returns the month and year of a date as hoteliga booking engine requires\nfunction getMonthYearFromDate(inputDate) {\n    return (inputDate.getMonth() + 1) + '-' + inputDate.getFullYear();\n}\n\n\/\/ event that fires when the user selects a date in the 'from'\n\/\/ date picker. Min\/max allowed dates in the 'to' datepicker\n\/\/ are adjusted in this case\nfunction onSelectDatepicker(selectedDate) {\n    if (this.id == 'from') {\n        var dateMin = $('#from').datepicker(\"getDate\");\n        $('#to').datepicker(\"option\", \"minDate\", getOffsetDate(dateMin, minStayDays));\n        $('#to').datepicker(\"option\", \"maxDate\", getOffsetDate(dateMin, maxStayDays));\n    }\n}\n\n\/\/ this creates string formatting functionality\n\/\/ used by getHoteligaResultsUrl()\nif (!String.prototype.format) {\n    String.prototype.format = function() {\n        var args = arguments;\n        return this.replace(\/{(\\d+)}\/g, function(match, number) {\n            return typeof args[number] != 'undefined' ? args[number] : match;\n        });\n    };\n}\n\n\/\/ generates the hoteliga results page where the user will\n\/\/ be redirected when the 'search' button is clicked\nfunction getHoteligaResultsUrl(domain, df, myf, dt, myt, promocode) {\n    return 'https:\/\/book.hoteliga.com\/acropolishouse\/search\/results?df={1}&myf={2}&dt={3}&myt={4}&promo={5}&lang=el'.format(domain, df, myf, dt, myt, promocode)\n}\n\n\/\/ code running on page load\n$(function() {\n\n    \/\/ initialize the two datepickers\n    $(\"#from, #to\").datepicker({\n        dateFormat: dateFormat,\n        defaultDate: getOffsetDate(null, minArrivalOffset),\n        minDate: getOffsetDate(null, minArrivalOffset),\n        changeMonth: true,\n        numberOfMonths: numberOfMonths,\n        onSelect: onSelectDatepicker\n    });\n\n    \/\/ show initial values (from-to) on textboxes\n    $(\"#from\").datepicker().datepicker(\"setDate\", getOffsetDate(null, minArrivalOffset));\n    $(\"#to\").datepicker().datepicker(\"setDate\", getOffsetDate(null, minArrivalOffset + minStayDays));\n\n    \/\/ redirect to results page on click of 'search' button\n    $(\"#searchBtn\").bind(\"click\", function() {\n        var df = $(\"#from\").datepicker(\"getDate\").getDate();\n        var dt = $(\"#to\").datepicker(\"getDate\").getDate();\n        var myf = getMonthYearFromDate($(\"#from\").datepicker(\"getDate\"));\n        var myt = getMonthYearFromDate($(\"#to\").datepicker(\"getDate\"));\n        var promocode = $(\"#promocode\").val();\n        var url = getHoteligaResultsUrl(domain, df, myf, dt, myt, promocode);\n        location.href = url;\n    });\n\n});\n<\/script>\n\n\n<!-- FORM --><div class=\"fusion-clearfix\"><\/div><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"100-width.php","meta":{"footnotes":""},"class_list":["post-5386","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/acropolishouse.gr\/el\/wp-json\/wp\/v2\/pages\/5386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/acropolishouse.gr\/el\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/acropolishouse.gr\/el\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/acropolishouse.gr\/el\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/acropolishouse.gr\/el\/wp-json\/wp\/v2\/comments?post=5386"}],"version-history":[{"count":5,"href":"https:\/\/acropolishouse.gr\/el\/wp-json\/wp\/v2\/pages\/5386\/revisions"}],"predecessor-version":[{"id":5783,"href":"https:\/\/acropolishouse.gr\/el\/wp-json\/wp\/v2\/pages\/5386\/revisions\/5783"}],"wp:attachment":[{"href":"https:\/\/acropolishouse.gr\/el\/wp-json\/wp\/v2\/media?parent=5386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}