{"id":237632,"date":"2023-09-06T12:27:07","date_gmt":"2023-09-06T10:27:07","guid":{"rendered":"https:\/\/sosnk.org\/?page_id=237632"},"modified":"2023-10-31T07:24:45","modified_gmt":"2023-10-31T06:24:45","slug":"donacija","status":"publish","type":"page","link":"https:\/\/sosnk.org\/en\/donacija\/","title":{"rendered":"(Crnogorski) Donacija"},"content":{"rendered":"<style>\r\n\tbody {\r\n\t\tfont-family: Arial, sans-serif;\r\n\t}\r\n\t\r\n\th1 {\r\n\t\ttext-align: center;\r\n\t\tmargin-top: 50px;\r\n\t}\r\n\t\r\n\t.custom-container {\r\n\t\tmargin: 50px auto;\r\n\t\ttext-align: center;\r\n\t}\r\n\t\r\n\t.donation-buttons {\r\n\r\n\t\tmargin-bottom: 20px;\r\n\t}\r\n\t\r\n\t.donation-buttons button {\r\n\t\t\/*\r\n\t\t\tflex-basis: 100%;\r\n\t\t*\/\r\n\t\tmargin: 5px;\r\n\t\tpadding: 10px 30px;\r\n\t\tbackground-color: #007bff;\r\n\t\tcolor: #fff;\r\n\t\tborder: none;\r\n\t\tborder-radius: 5px;\r\n\t\tcursor: pointer;\r\n\t\ttransition: background-color 0.3s;\r\n\t}\r\n\t\r\n\t.donation-buttons button:hover {\r\n\t\tbackground-color: #0062cc;\r\n\t}\r\n\t\r\n\t.donation-buttons button.active {\r\n\t\tbackground-color: #0056b3;\r\n\t}\r\n\t\r\n\t.custom-amount {\r\n\t\tdisplay: none;\r\n\t\tmargin-bottom: 20px;\r\n\t\tmax-width: 400px;\r\n\t\tmargin-left: auto;\r\n\t\tmargin-right: auto;\r\n\t}\r\n\t\r\n\t.custom-amount label {\r\n\t\tdisplay: block;\r\n\t\tmargin-bottom: 5px;\r\n\t}\r\n\t\r\n\t.custom-amount input {\r\n\t\tpadding: 10px;\r\n\t\tborder: 1px solid #ccc;\r\n\t\tborder-radius: 5px;\r\n\t\tmax-width: 400px;\r\n\t}\r\n\t\r\n\t#donate-btn {\r\n\t\tpadding: 10px 20px;\r\n\t\tbackground-color: #28a745;\r\n\t\tcolor: #fff;\r\n\t\tborder: none;\r\n\t\tborder-radius: 5px;\r\n\t\tcursor: pointer;\r\n\t\ttransition: background-color 0.3s;\r\n\t}\r\n\t\r\n\t.donate-btn:hover {\r\n\t\tbackground-color: #218838;\r\n\t}\r\n\r\n<\/style>\r\n<h1>Doniraj<\/h1>\r\n<div class=\"custom-container\">\r\n<form action=\"https:\/\/ecommerce.2bi.me\/sosnk\/PaymentInit.php\">\r\n\t<div class=\"donation-buttons\">\r\n\t\t<button id=\"btn-5\">\u20ac5<\/button>\r\n\t\t<button id=\"btn-10\">\u20ac10<\/button>\r\n\t\t<button id=\"btn-20\">\u20ac20<\/button>\r\n\t\t<button id=\"btn-custom\">Drugi iznos<\/button>\r\n\t<\/div>\r\n\t<div class=\"custom-amount\">\r\n\t\t<label for=\"amount\">Unesi drugi iznos:<\/label>\r\n\t\t<input type=\"number\" id=\"amount\" name=\"amount\" min=\"1\">\r\n\t<\/div>\r\n\t<input type=\"text\" id=\"trackid\" name=\"trackid\" value=\"10959178\" hidden\/>\r\n\t<button id=\"donate-btn\">Doniraj<\/button>\r\n<\/form>\r\n<\/div>\r\n\r\n<script>\r\nconst btn5 = document.getElementById('btn-5');\r\nconst btn10 = document.getElementById('btn-10');\r\nconst btn20 = document.getElementById('btn-20');\r\nconst btnCustom = document.getElementById('btn-custom');\r\nconst customAmount = document.querySelector('.custom-amount');\r\nconst donateBtn = document.getElementById('donate-btn');\r\n\r\nbtn5.addEventListener('click', (e) => {\r\n\te.preventDefault();\r\n\tdocument.getElementById('amount').value = 5;\r\n\tbtn5.classList.add('active');\r\n\tbtn10.classList.remove('active');\r\n\tbtn20.classList.remove('active');\r\n\tbtnCustom.classList.remove('active');\r\n});\r\n\r\nbtn10.addEventListener('click', (e) => {\r\n\te.preventDefault();\r\n\tdocument.getElementById('amount').value = 10;\r\n\tbtn5.classList.remove('active');\r\n\tbtn10.classList.add('active');\r\n\tbtn20.classList.remove('active');\r\n\tbtnCustom.classList.remove('active');\r\n});\r\n\r\nbtn20.addEventListener('click', (e) => {\r\ne.preventDefault();\r\ndocument.getElementById('amount').value = 20;\r\nbtn5.classList.remove('active');\r\nbtn10.classList.remove('active');\r\nbtn20.classList.add('active');\r\nbtnCustom.classList.remove('active');\r\n});\r\n\r\nbtnCustom.addEventListener('click', (e) => {\r\ne.preventDefault();\r\ncustomAmount.style.display = 'block';\r\nbtn5.classList.remove('active');\r\nbtn10.classList.remove('active');\r\nbtn20.classList.remove('active');\r\nbtnCustom.classList.add('active');\r\n});\r\n\r\ndonateBtn.addEventListener('click', () => {\r\nconst amount = document.getElementById('amount').value;\r\n\r\nif (amount === '') {\r\n\talert('Please enter a donation amount.');\r\n} else if (isNaN(amount) || amount <= 0) {\r\n\talert('Please enter a valid donation amount.');\r\n}\r\n});\r\n<\/script>","protected":false},"excerpt":{"rendered":"","protected":false},"author":6716,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/sosnk.org\/en\/wp-json\/wp\/v2\/pages\/237632"}],"collection":[{"href":"https:\/\/sosnk.org\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sosnk.org\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sosnk.org\/en\/wp-json\/wp\/v2\/users\/6716"}],"replies":[{"embeddable":true,"href":"https:\/\/sosnk.org\/en\/wp-json\/wp\/v2\/comments?post=237632"}],"version-history":[{"count":0,"href":"https:\/\/sosnk.org\/en\/wp-json\/wp\/v2\/pages\/237632\/revisions"}],"wp:attachment":[{"href":"https:\/\/sosnk.org\/en\/wp-json\/wp\/v2\/media?parent=237632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}