[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] cookies: In dialog mode prevent dismissing the modal
"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]> Wed, 15 Jul 2026 17:41:01 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a57c62d63269_3819ca58270c1@gitlab-sidekiq-low-urgency-cpu-bound-v2-56b6659d64-94m5b.mail> |
Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki Commits: d16cd140 by Jonny Bradley at 2026-07-15T17:40:26+00:00 [FIX] cookies: In dialog mode prevent dismissing the modal --- * [FIX] cookies: In dialog mode, setting the background as static (to prevent closing the dialog without clicking one of the buttons) was dependent on the `cookie_consent_disable` pref, which wasn't being added to the jqueryTiki object, so fixed that. However, as i understand it, it was operating back to front, so i switched the logic, and now you can "dismiss" the modal only when `cookie_consent_disable=y`. This pref's behaviour has changed following the mammoth revamp in MR !5263 and now doesn't quite make sense imho See merge request tikiwiki/tiki!10727 (cherry picked from commit 6cac050105e6c7ffb3560283cdd7bcc840172bc6) 35c58050 [FIX] cookies: In modal mode, setting the background as static (to prevent... Co-authored-by: Jonny Bradley <[email protected]> - - - - - 2 changed files: - lib/setup/javascript.php - src/js/jquery-tiki/tiki-cookie-handler.js Changes: ===================================== lib/setup/javascript.php ===================================== @@ -250,6 +250,7 @@ if (! timezone) { $jqueryTiki['cookie_consent_dom_id'] = $prefs['cookie_consent_dom_id']; $jqueryTiki['cookie_consent_mode'] = $prefs['cookie_consent_mode']; $jqueryTiki['cookie_consent_expires'] = $prefs['cookie_consent_expires']; + $jqueryTiki['cookie_consent_disable'] = $prefs['cookie_consent_disable'] === "y"; $jqueryTiki['cookie_consent_name'] = CookieConsentLib::COOKIE_CONSENT_NAME; $jqueryTiki['cookie_consent_categories'] = json_encode(array_keys(CookieConsentLib::getCookieCategories())); $jqueryTiki['cookie_consent_value'] = json_encode(CookieConsentLib::getConsentPreferences(), JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); ===================================== src/js/jquery-tiki/tiki-cookie-handler.js ===================================== @@ -166,8 +166,8 @@ $(document).ready(() => { setTimeout(() => { const cookieDialogElement = $(`#${jqueryTiki.cookie_consent_dom_id}`); cookieDialogElement.modal({ - backdrop: jqueryTiki.cookie_consent_disable === "y" ? "static" : true, - keyboard: jqueryTiki.cookie_consent_disable === "y" ? false : true, + backdrop: jqueryTiki.cookie_consent_disable ? true : "static", + keyboard: !jqueryTiki.cookie_consent_disable, }); cookieDialogElement.modal("show").css({ backgroundColor: "transparent", View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d16cd140ddb55c007173b0fa03b97fc50f6dbe30 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/d16cd140ddb55c007173b0fa03b97fc50f6dbe30 You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help _______________________________________________ TikiWiki-cvs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs