{"id":1799,"date":"2024-11-16T18:27:55","date_gmt":"2024-11-16T17:27:55","guid":{"rendered":"https:\/\/newinprague.cz\/?page_id=1799"},"modified":"2025-01-17T07:57:59","modified_gmt":"2025-01-17T06:57:59","slug":"zpetna-vazba","status":"publish","type":"page","link":"https:\/\/newinprague.cz\/en\/zpetna-vazba","title":{"rendered":"Feedback"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">We value your opinion, which helps us continuously improve our website.<\/p>\n\n\n\n<div id=\"feedback-form\">\n  <form id=\"survey-form\">\n    <!-- Prvn\u00ed ot\u00e1zka -->\n    <div>\n      <h4>How satisfied are you with our website?<\/h4>\n      <div class=\"emoji-rating\">\n        <input type=\"radio\" id=\"emoji1\" name=\"rating\" value=\"1\">\n        <label for=\"emoji1\">?<\/label>\n        <input type=\"radio\" id=\"emoji2\" name=\"rating\" value=\"2\">\n        <label for=\"emoji2\">\u2639\ufe0f<\/label>\n        <input type=\"radio\" id=\"emoji3\" name=\"rating\" value=\"3\">\n        <label for=\"emoji3\">?<\/label>\n        <input type=\"radio\" id=\"emoji4\" name=\"rating\" value=\"4\">\n        <label for=\"emoji4\">?<\/label>\n        <input type=\"radio\" id=\"emoji5\" name=\"rating\" value=\"5\">\n        <label for=\"emoji5\">?<\/label>\n      <\/div>\n    <\/div>\n    <!-- Druh\u00e1 ot\u00e1zka -->\n    <div>\n      <h4>Were you able to easily find the information you were looking for?<\/h4>\n      <div>\n        <label><input type=\"radio\" name=\"experience\" value=\"Snadno jsem na\u0161el\/a v\u0161echny informace\">I easily found all the information.<\/label>\n        <label><input type=\"radio\" name=\"experience\" value=\"Navigace byla snadn\u00e1, ale ne v\u0161echny informace, kter\u00e9 jsem hledal\/a, byly k dispozici.\"> Navigation was easy, but not all the information I was looking for was available.<\/label>\n        <label><input type=\"radio\" name=\"experience\" value=\"Dok\u00e1zal\/a jsem naj\u00edt v\u0161echny informace, kter\u00e9 jsem pot\u0159eboval\/a, ale orientace nebyla snadn\u00e1\">I was able to find all the information I needed, but navigation was not easy.<\/label>\n<label><input type=\"radio\" name=\"experience\" value=\"Nemohl\/a jsem naj\u00edt pot\u0159ebn\u00e9 informace a orientace na webu nebyla snadn\u00e1\">I couldn\u2019t find the information I needed, and navigating the website was not easy.<\/label>\n      <\/div>\n    <\/div>\n    <!-- T\u0159et\u00ed ot\u00e1zka -->\n    <br><div>\n      <label for=\"feedback\">Would you like to leave a comment?<\/label>\n      <textarea id=\"feedback\" name=\"feedback\" rows=\"3\" style=\"width: 100%;\"><\/textarea>\n    <\/div><br>\n    <!-- Odeslat -->\n<a class=\"wp-block-button__link wp-element-button\" id=\"submit-btn\">Send<\/a>\n  \n  <\/form>\n<\/div>\n<div id=\"thank-you-message\" style=\"display: none;\">\n  <h3 class=\"text-success\">Thank you for your feedback<\/h3>\n<\/div>\n<script>\n  document.getElementById('submit-btn').addEventListener('click', function () {\n    const rating = document.querySelector('input[name=\"rating\"]:checked')?.value || '';\n    const experience = document.querySelector('input[name=\"experience\"]:checked')?.value || '';\n    const feedback = document.getElementById('feedback').value;\n\n    if (!rating || !experience) {\n      alert('Please fill in all required fields.');\n      return;\n    }\n\n    fetch('\/wp-admin\/admin-ajax.php', {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application\/x-www-form-urlencoded',\n      },\n      body: new URLSearchParams({\n        action: 'submit_feedback',\n        rating,\n        experience,\n        feedback,\n      }),\n    })\n      .then((response) => response.json())\n      .then((data) => {\n        if (data.success) {\n          document.getElementById('feedback-form').style.display = 'none';\n          document.getElementById('thank-you-message').style.display = 'block';\n        } else {\n          alert('There was an error sending feedback. Please try again.');\n        }\n      })\n      .catch((error) => {\n        console.error('Error:', error);\n        alert('There was an error sending. Please check your internet connection and try again.');\n      });\n  });\n<\/script>\n<style>\n  \/* Styl pro smajl\u00edky *\/\n  .emoji-rating {\ndisplay: flex;}\n\n  .emoji-rating input {\n    display: none;\n  }\n  .emoji-rating label {\n    font-size: 2rem;\n    cursor: pointer;\n    padding: 0 5px;\n    transition: transform 0.2s, opacity 0.2s;\n    opacity: 0.6;\n  }\n  .emoji-rating input:checked + label {\n    transform: scale(1.3);\n    opacity: 1;\n  }\n  .emoji-rating label:hover {\n    transform: scale(1.2);\n    opacity: 1;\n  }\n\n        input[type=\"radio\"], input[type=\"checkbox\"] {\n            accent-color: var(--wp--preset--color--accent-3);\n            margin-right: 1rem;\n        }\n<\/style>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We value your opinion, which helps us continuously improve our website. How satisfied are you with our website? ? \u2639\ufe0f ? ? ? Were you able to easily find the information you were looking for? I easily found all the information. Navigation was easy, but not all the information I was looking for was available. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1799","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/newinprague.cz\/en\/wp-json\/wp\/v2\/pages\/1799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/newinprague.cz\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/newinprague.cz\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/newinprague.cz\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/newinprague.cz\/en\/wp-json\/wp\/v2\/comments?post=1799"}],"version-history":[{"count":1,"href":"https:\/\/newinprague.cz\/en\/wp-json\/wp\/v2\/pages\/1799\/revisions"}],"predecessor-version":[{"id":1801,"href":"https:\/\/newinprague.cz\/en\/wp-json\/wp\/v2\/pages\/1799\/revisions\/1801"}],"wp:attachment":[{"href":"https:\/\/newinprague.cz\/en\/wp-json\/wp\/v2\/media?parent=1799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}