{"id":8730,"date":"2024-12-11T16:22:53","date_gmt":"2024-12-11T13:22:53","guid":{"rendered":"http:\/\/law.ukma.edu.ua\/?page_id=8730"},"modified":"2025-02-27T14:27:39","modified_gmt":"2025-02-27T10:27:39","slug":"donate","status":"publish","type":"page","link":"https:\/\/law.ukma.edu.ua\/en\/donate\/","title":{"rendered":"Donate"},"content":{"rendered":"<style>\n  .ptb__container {\n    max-width: 1230px;\n    margin: 0 auto;\n    padding: 16px 0 0;\n  }\n\n  .ptb__container * {\n    box-sizing: border-box;\n  }\n\n  .ptb__container li::before {\n    content: none !important;\n  }\n\n  .ptb__row {\n    display: flex;\n    gap: 5%;\n  }\n\n  .donation__form {\n    padding: 24px 15px 32px;\n    border-radius: 16px;\n    border: 1px solid #c9cde0;\n    background-color: #fff;\n    max-width: 450px;\n  }\n\n  .donation__tabs {\n    padding-bottom: 17px;\n    margin-bottom: 24px;\n    display: flex;\n    justify-content: space-between;\n    gap: 54px;\n    padding-bottom: 17px;\n    position: relative;\n  }\n\n  .donation__tabs::after {\n    content: '';\n    position: absolute;\n    display: block;\n    width: 100%;\n    height: 1px;\n    background-color: #aab2ca;\n    left: 0;\n    bottom: 2px;\n  }\n\n  .tabs__option {\n    color: #111;\n    font-weight: 300;\n    position: relative;\n    line-height: 24px;\n    cursor: pointer;\n  }\n  .tabs__option::after {\n    content: '';\n    display: block;\n    bottom: -15px;\n    width: 100%;\n    height: 5px;\n    opacity: 0;\n    background-color: blue;\n    border-radius: 4px 4px 0 0;\n    position: absolute;\n    z-index: 1;\n    transition: opacity 0.3s linear;\n  }\n\n  .tabs__option.active {\n    font-weight: 600;\n  }\n\n  .tabs__option.active::after {\n    opacity: 1;\n  }\n\n  .donation__sum {\n    border-bottom: 2px dotted #aab2ca;\n    padding-bottom: 2px;\n    display: flex;\n    justify-content: space-between;\n  }\n\n  .donation__sum--input {\n    font-size: 56px;\n    line-height: 56px;\n    width: 100%;\n    background-color: transparent;\n    border: none;\n    outline: none;\n    padding-right: 20px;\n  }\n  .donation__sum--currency {\n    align-self: end;\n    font-size: 24px;\n    line-height: 32px;\n    color: #aab2ca;\n  }\n\n  .donation__options {\n    display: flex;\n    gap: 10px;\n    margin: 16px 0 24px;\n  }\n\n  .donation__options.hide {\n    display: none;\n  }\n\n  .donation__btn {\n    width: 100%;\n    height: 48px;\n    min-height: 48px;\n    color: #111;\n    background-color: transparent;\n    border: 1px solid #aab2ca;\n    font-size: 16px;\n    line-height: 24px;\n    transition: all 0.3s linear;\n    border-radius: 100px;\n    width: 100%;\n    cursor: pointer;\n  }\n  .donation__btn:hover {\n    background-color: #c9cde0;\n    border-color: #c9cde0;\n    color: #4e51ff;\n  }\n\n  .donation__btn--currency {\n    color: #aab2ca;\n    font-size: 14px;\n    line-height: 21px;\n  }\n\n  .currency__select {\n    max-width: 83px;\n    min-height: 32px;\n    display: flex;\n    align-items: center;\n  }\n  .currency__arrow {\n    width: 0;\n    height: 0;\n    border-left: 5px solid transparent;\n    border-right: 5px solid transparent;\n    border-top: 5px solid #aab2ca;\n    border-top-color: #aab2ca;\n    color: #fff;\n    cursor: pointer;\n    display: flex;\n    align-items: center;\n    transition: transform 0.3s ease;\n    position: relative;\n  }\n  .currency__arrow:hover {\n    border-top-color: #4e5362;\n  }\n  .currency__arrow.active {\n    transform: rotate(180deg);\n    border-top-color: #4e5362;\n  }\n  .arrow {\n    position: absolute;\n    right: 0;\n    top: 50%;\n    width: 10px;\n    z-index: 5000;\n  }\n\n  .currency__name {\n    padding-left: 15px;\n    color: #aab2ca;\n    font-size: 24px;\n    line-height: 32px;\n    cursor: pointer;\n  }\n  .currency__name.active {\n    color: #4e5362;\n  }\n\n  .currency__container {\n    position: relative;\n    align-self: center;\n  }\n\n  .currency__list {\n    list-style: none;\n    border-radius: 8px;\n    background-color: #fff;\n    border: 1px solid #aab2ca;\n    padding: 8px 0;\n    max-width: 84px;\n    position: absolute;\n    left: 0;\n    right: 0;\n    top: 20px;\n    z-index: 1;\n  }\n  .currency__list.hidden {\n    display: none;\n  }\n  .currency__item {\n    padding: 4px 0;\n    text-align: center;\n    cursor: pointer;\n  }\n  .currency__item:hover {\n    background-color: rgba(128, 128, 128, 0.5);\n  }\n\n  .donation__submitBtn {\n    display: flex;\n    width: 100%;\n    font-size: 16px;\n    line-height: 24px;\n    padding: 12px 32px;\n    min-height: 56px;\n    color: #fff;\n    background: #27468f;\n    transition: all 0.3s linear;\n    border-radius: 100px;\n    border: none;\n    position: relative;\n    align-items: center;\n    justify-content: space-between;\n    cursor: pointer;\n  }\n\n  .donation__submitBtn:hover {\n    background: #072059;\n  }\n\n  .donation__submitBtn--text.hidden {\n    display: none;\n  }\n\n  .donation__submitBtn--svg {\n    width: 32px;\n    height: 32px;\n  }\n\n  .donation__info {\n    display: none;\n    align-items: center;\n    margin-top: 15px;\n  }\n  .donation__info.active {\n    display: flex;\n  }\n  .donation__info--icon {\n    min-width: 24px;\n    margin-right: 16px;\n  }\n\n  .donation__info svg circle {\n    stroke: #4e5362;\n  }\n\n  .donation__info svg path {\n    fill: #4e5362;\n  }\n\n  .donation__info--text {\n    font-size: 14px;\n    line-height: 21px;\n    color: #111;\n\n    opacity: 0.64;\n  }\n\n  .donation__info--text a {\n    font-size: 14px;\n    line-height: 21px;\n    color: #111;\n    font-weight: 600;\n    text-decoration: underline;\n    text-decoration-skip-ink: none;\n  }\n\n  @media screen and (max-width: 700px) {\n    .ptb__row {\n      flex-direction: column;\n      justify-content: center;\n      gap: 30px;\n    }\n\n    .left {\n      display: flex;\n      justify-content: center;\n    }\n\n    .left,\n    .right {\n      width: 100%;\n      box-sizing: border-box;\n    }\n\n    .ptb__row .right {\n      padding: 10px;\n    }\n\n    .methods__list {\n      flex-direction: column;\n      gap: 15px;\n    }\n\n    .ptb__section .methods__item {\n      width: 100% !important;\n    }\n\n    .ptb__section .projects__item {\n      height: 250px !important;\n    }\n\n    .ptb__section .item__text {\n      margin-top: 10px !important;\n    }\n\n    .right .right__block .row {\n      justify-content: space-between;\n    }\n\n    .right .right__block .block__title {\n      max-width: min-content !important;\n      min-width: min-content !important;\n      text-align: start !important;\n    }\n\n    .right .right__block .block__text {\n      text-align: center;\n    }\n  }\n\n  \/* RIGHT *\/\n  .right {\n    flex: 1;\n    padding: 20px 15px;\n    border-radius: 16px;\n    border: 1px solid #c9cde0;\n  }\n  .right .subtitle {\n    color: #00358e;\n    font-weight: 600;\n    font-size: 22px;\n    margin: 0 0 10px;\n  }\n\n  .right .subtitle.mid {\n    margin-top: 40px;\n  }\n\n  .right .text {\n    margin: 0;\n  }\n\n  .right .line {\n    display: flex;\n    gap: 10px;\n    align-items: center;\n  }\n\n  .right .row button {\n    display: flex;\n    padding: 5px;\n    border: 1px solid transparent;\n    border-radius: 10px;\n    cursor: pointer;\n    background-color: transparent;\n    transition: all 0.5s linear;\n  }\n\n  .right .row button:hover {\n    border: 1px solid grey;\n  }\n\n  .right .right__block {\n    display: flex;\n    flex-direction: column;\n    gap: 15px;\n  }\n\n  .right .right__block .row {\n    display: flex;\n    align-items: center;\n    gap: 10px;\n    flex-wrap: nowrap !important;\n    margin-right: 0 !important;\n    margin-left: 0 !important;\n  }\n\n  .right .right__block .block__title {\n    min-width: 25%;\n    max-width: 25%;\n    margin: 0;\n    text-align: center;\n  }\n\n  .right .right__block .block__text {\n    margin: 0;\n  }\n\n  \/* SECTION *\/\n  .ptb__section .section__title {\n    text-transform: uppercase;\n    font-size: 25px;\n    text-align: center;\n    font-weight: bold;\n  }\n\n  .ptb__section {\n    color: #283c5d;\n  }\n\n  .ptb__section.methods {\n    margin-top: 50px;\n  }\n\n  .ptb__section .methods__list {\n    display: flex;\n    justify-content: space-between;\n    list-style: none;\n    padding: 0;\n  }\n\n  .ptb__section .methods__item {\n    width: 20%;\n    background-color: #072059;\n    padding: 15px;\n    color: white;\n    font-size: 30px;\n  }\n\n  .ptb__section .methods__item img {\n    width: 100%;\n    height: 100%;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    font-weight: bold;\n  }\n\n  \/* PROJECTS *\/\n\n  .ptb__section.projects--hidden {\n    display: none;\n  }\n\n  .ptb__section .projects__list {\n    list-style: none;\n    display: flex;\n    flex-wrap: wrap;\n    justify-content: space-around;\n    gap: 20px 10px;\n    padding: 0;\n  }\n\n  .ptb__section .projects__item {\n    width: 300px;\n    color: white;\n    font-size: 30px;\n    padding-left: 0 !important;\n  }\n\n  .ptb__section .projects__item a {\n    padding: 15px;\n    background-color: #00358e;\n    display: flex;\n    flex-direction: column;\n    text-decoration: none;\n    color: white;\n    height: 100%;\n    transition: all 0.5s linear;\n  }\n\n  .ptb__section .projects__item a:hover {\n    background-color: #052b6d;\n  }\n\n  .ptb__section .item__logo {\n    width: 40%;\n    height: 80px;\n    transition: all 0.5s linear;\n  }\n\n  .ptb__section .projects__item a:hover > .item__logo {\n    transform: translateX(150%);\n  }\n\n  .ptb__section .item__text {\n    margin-bottom: 10px;\n    margin-right: auto;\n  }\n\n  .ptb__section .item__more {\n    margin-top: auto;\n    display: flex;\n    gap: 10px;\n    opacity: 0.4;\n    transition: all 0.5s linear;\n    align-items: center;\n  }\n\n  .ptb__section .projects__item a:hover > .item__more {\n    opacity: 1;\n  }\n\n  .ptb__section .item__more img {\n    width: 20px;\n    height: 20px;\n  }\n\n  .ptb__section .item__details {\n    font-size: 16px;\n    margin: 0;\n    padding: 0;\n  }\n\n  \/* QUESTIONS *\/\n  .ptb__section .question {\n    font-weight: bold;\n    font-size: 19px;\n  }\n\n  .ptb__section .ansver::before {\n    content: '\ud83d\udc49';\n  }\n\n  .post__content ul li:not(:last-child) {\n    margin-bottom: 0px !important;\n  }\n\n  .post__content ul li {\n    padding: 0 !important;\n  }\n<\/style>\n\n<!-- *********************************************************** -->\n<script>\n  const input = document.getElementById('donation__value');\n  const formValue = document.getElementById('form_value');\n  const formSignature = document.getElementById('form_signature');\n  const tabs = document.querySelectorAll('.tabs__option');\n  const addButtons = document.querySelectorAll('.donation__btn');\n  const currencySelector = document.querySelector('.currency__container');\n  const currencyList = document.querySelector('.currency__list');\n  const currencyItems = document.querySelectorAll('.currency__item');\n  const currencyName = document.querySelector('.currency__name');\n  const currencyButtons = document.querySelectorAll('.donation__btn--currency');\n  const arrow = document.querySelector('.currency__arrow');\n  const submitBtn = document.querySelector('.donation__submitBtn');\n  const submitBtnText = document.querySelector('.donation__submitBtn--text');\n  const subscribeInfoBlock = document.querySelector('.donation__info');\n  const uahButtons = document.getElementById('uahButtons');\n  const usdButtons = document.getElementById('usdButtons');\n  const eurButtons = document.getElementById('eurButtons');\n\n  const formContent = document.querySelector('.form_content');\n\n  window.onload = () => {\n    createForm(valueObj);\n  };\n\n  let currentCurrency = 'UAH';\n\n  const valueObj = {\n    version: '3',\n    public_key: '',\n    action: 'paydonate',\n    amount: input.value,\n    currency: currentCurrency,\n    description: 'description text',\n    order_id: 'order_id_1',\n  };\n\n  tabs.forEach((tab) => {\n    tab.addEventListener('click', () => {\n      if (!tab.classList.contains('active')) {\n        tabs.forEach((tab) => {\n          tab.classList.remove('active');\n        });\n        tab.classList.add('active');\n        if (tab.dataset.type === '1') {\n          subscribeInfoBlock.classList.remove('active');\n\n          valueObj.action = 'paydonate';\n          createForm(valueObj);\n          submitBtnText.textContent = '\u041f\u0456\u0434\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0440\u0430\u0437\u043e\u0432\u043e';\n        } else if (tab.dataset.type === '2') {\n          \/\/GEN FORM!!!\n          subscribeInfoBlock.classList.add('active');\n          valueObj.action = 'subscribe';\n          createForm(valueObj);\n          submitBtnText.textContent = ' \u041f\u0456\u0434\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0449\u043e\u043c\u0456\u0441\u044f\u0447\u043d\u043e';\n        }\n      }\n    });\n  });\n\n  addButtons.forEach((btn) => {\n    btn.addEventListener('click', () => {\n      input.value = +input.value + +btn.dataset.val;\n      valueObj.amount = input.value;\n\n      createForm(valueObj);\n    });\n  });\n\n  function checkInput(event) {\n    const input = event.target;\n    let value = input.value;\n\n    if (value.length > 1 && value[0] === '0') {\n      value = value.slice(1);\n    }\n\n    value = value.replace(\/\\D\/g, '');\n\n    input.value = value;\n    valueObj.amount = value;\n\n    createForm(valueObj);\n  }\n\n  currencyItems.forEach((item) => {\n    item.addEventListener('click', () => {\n      currentCurrency = item.textContent;\n      currencyName.textContent = currentCurrency;\n\n      if (!uahButtons.classList.contains('hide')) {\n        uahButtons.classList.add('hide');\n      }\n      if (!usdButtons.classList.contains('hide')) {\n        usdButtons.classList.add('hide');\n      }\n      if (!eurButtons.classList.contains('hide')) {\n        eurButtons.classList.add('hide');\n      }\n\n      if (currentCurrency === 'USD') {\n        usdButtons.classList.remove('hide');\n      }\n      if (currentCurrency === 'UAH') {\n        uahButtons.classList.remove('hide');\n      }\n      if (currentCurrency === 'EUR') {\n        eurButtons.classList.remove('hide');\n      }\n\n      valueObj.currency = currentCurrency;\n\n      createForm(valueObj);\n    });\n  });\n\n  currencySelector.addEventListener('click', () => {\n    currencyList.classList.toggle('hidden');\n    arrow.classList.toggle('active');\n    currencyName.classList.toggle('active');\n  });\n\n  function createForm(obj) {\n    fetch(\n      `\/wp-content\/plugins\/ptb\/getform.php?type=${obj.action}&amount=${+obj.amount}&currency=${\n        obj.currency\n      }`\n    )\n      .then((response) => response.json())\n      .then((data) => {\n        const { data: encodedData, signature } = data;\n\n        formValue.value = encodedData;\n        formSignature.value = signature;\n      })\n      .catch((error) => {\n        console.error('Error:', error);\n      });\n  }\n\n  const buttons = document.querySelectorAll('.copy__btn');\n\n  buttons.forEach((btn) => {\n    const bufferText = btn.previousElementSibling.innerHTML.trim();\n\n    btn.addEventListener('click', () => {\n      navigator.clipboard.writeText(bufferText);\n    });\n  });\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"tpl__ptb.php","meta":{"inline_featured_image":false,"footnotes":""},"class_list":["post-8730","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/law.ukma.edu.ua\/en\/wp-json\/wp\/v2\/pages\/8730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/law.ukma.edu.ua\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/law.ukma.edu.ua\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/law.ukma.edu.ua\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/law.ukma.edu.ua\/en\/wp-json\/wp\/v2\/comments?post=8730"}],"version-history":[{"count":21,"href":"https:\/\/law.ukma.edu.ua\/en\/wp-json\/wp\/v2\/pages\/8730\/revisions"}],"predecessor-version":[{"id":9603,"href":"https:\/\/law.ukma.edu.ua\/en\/wp-json\/wp\/v2\/pages\/8730\/revisions\/9603"}],"wp:attachment":[{"href":"https:\/\/law.ukma.edu.ua\/en\/wp-json\/wp\/v2\/media?parent=8730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}