jQuery(document).ready(function ($) { const checkbox = $('input[name*="is_pinned_post"]'); if (!checkbox.length || !PinnedPostData) return; let confirmed = false; $("#post").on("submit", function (e) { if (!checkbox.is(":checked")) return; if (confirmed) return; const message = `Пост "${PinnedPostData.title}" вже закріплений.\n` + `Якщо продовжити — він буде відкріплений.\n\nПродовжити?`; if (!confirm(message)) { e.preventDefault(); checkbox.prop("checked", false); return false; } confirmed = true; }); });
Thank you for being patient. We are doing some work on the site and will be back shortly.