[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] Fix cookie consent finally (for 29.x)
"Domeshow Emmanuel \(@Domeshow\) via TikiWiki-cvs" <[email protected]> Mon, 13 Jul 2026 13:36:28 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a54e9dc22c42_3819bfcc1900@gitlab-sidekiq-low-urgency-cpu-bound-v2-86bfb4b59d-h5psv.mail> |
Domeshow Emmanuel pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki Commits: 03ec1741 by Jonny Bradley at 2026-07-13T16:27:44+03:00 Fix cookie consent finally (for 29.x) --- * Fix cookie consent finally --- * [FIX] cookies: Remove ugly hard-coded styles and replace with a bootstrap class * [FIX] cookies: Better still, remove the pointless div entirely * [FIX] cookies: Add missing closing div in dialog mode html (yes, that's all it was) * [REF] cookies: Attempt to reformat cookie_consent.tpl (not easy as the structure is wrong) See merge request tikiwiki/tiki!10567 (cherry picked from commit 36a59af46d373004bda0b8b2dac1fcc083d17030) 93c85851 [REF] cookies: Attempt to reformat cookie_consent.tpl (not easy as the structure is wrong) ed118d67 [FIX] cookies: Add missing closing div in dialog mode html (yes, that's all it was) 22ff7c73 [FIX] cookies: Better still, remove the pointless div entirely 4919b565 [FIX] cookies: Remove ugly hard-coded styles and replace with a bootstrap class Co-authored-by: Jonny Bradley <[email protected]> See merge request tikiwiki/tiki!10706 - - - - - 1 changed file: - templates/cookie_consent.tpl Changes: ===================================== templates/cookie_consent.tpl ===================================== @@ -1,80 +1,71 @@ {strip} - {if $prefs.cookie_consent_mode eq 'dialog'} +{if $prefs.cookie_consent_mode eq 'dialog'} <div class="modal" tabindex="-1" role="dialog" id="{$prefs.cookie_consent_dom_id}"> - <div class="modal-dialog modal-xl modal-dialog-centered" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <h5 class="modal-title">{tr}Cookie Consent{/tr}</h5> - </div> - <div class="modal-body"> - <form method="POST"> - <div class="w-100 h-100"> - {else} - <div id="{$prefs.cookie_consent_dom_id}" role="alert" style="position: fixed; top:0; z-index: 1050; background-color: rgba(0, 0, 0, 0.74); height: 100vh; width: 100vw;" - {if not empty($prefs.cookie_consent_mode)} - class="{$prefs.cookie_consent_mode}" {/if}> - <form method="POST" class="position-fixed bottom-0 start-0 end-0 collapse show" - style="z-index: 1050;"> - <div class="alert alert-primary rounded-2 border-top border-secondary border-1 mb-0 py-4 collapse show"> - <div class="container"> - {/if} - <div class="row mb-4"> - <div class="col-12"> - <p class="mb-0 lead"> - {wiki}{tr}{$prefs.cookie_consent_description}{/tr}{/wiki} - </p> - </div> - </div> - - <div id="customConsentSectionBanner" class="row mb-4"> - <div class="col-12 d-flex flex-wrap gap-3 gap-md-4"> - {foreach from=$cookie_categories key=category item=data} - <div class="form-check form-switch d-flex align-items-center flex-shrink-0"> - <input class="form-check-input me-2" type="checkbox" id="toggle{$category|capitalize}" - name="cookie_consent_{$category}" - {if $category == 'essential'}checked disabled aria-disabled="true"{/if}> - <label class="form-check-label me-2 fw-semibold" for="toggle{$category|capitalize}"> - {tr}{$data.name}{/tr} - </label> - <button type="button" class="btn btn-link p-0 text-decoration-none text-dark" - data-bs-toggle="tooltip" data-bs-placement="right" title="{tr}{$data.description}{/tr}" - aria-label="{tr}{$data.description}{/tr}"> - <i class="fas fa-info-circle"></i> - </button> - </div> - {/foreach} - </div> - </div> - - <div class="row"> - <div class="col-12 d-flex flex-wrap gap-2 justify-content-center justify-content-md-end"> - {if $prefs.cookie_consent_disable eq 'n'} - <button type="submit" class="btn btn-outline-danger" - id="cookie_decline_unnecessary_button"> - {tr}Refuse unnecessary{/tr} - </button> - {/if} - <button type="submit" class="btn btn-secondary" - id="cookie_save_button"> - {tr}Save preferences{/tr} - </button> - <button type="submit" class="btn btn-primary" - id="cookie_consent_preference" name="cookie_consent_preference"> - {tr}Accept all{/tr} - </button> - </div> - </div> - - {if $prefs.cookie_consent_mode neq 'dialog'} - </div> - </div> - {/if} - </form> - - {if $prefs.cookie_consent_mode eq 'dialog'} - </div> - </div> - </div> - {/if} + <div class="modal-dialog modal-xl modal-dialog-centered" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title">{tr}Cookie Consent{/tr}</h5> + </div> + <div class="modal-body"> + <form method="POST"> +{else} + <div id="{$prefs.cookie_consent_dom_id}" role="alert" class="fixed-bottom" + {if not empty($prefs.cookie_consent_mode)}class="{$prefs.cookie_consent_mode}" {/if}> + <form method="POST" class="position-fixed bottom-0 start-0 end-0 collapse show"> + <div class="alert alert-primary rounded-2 border-top border-secondary border-1 mb-0 py-4 collapse show"> + <div class="container"> +{/if} + <div class="row mb-4"> + <div class="col-12"> + <p class="mb-0 lead"> + {wiki}{tr}{$prefs.cookie_consent_description}{/tr}{/wiki} + </p> + </div> + </div> + + <div id="customConsentSectionBanner" class="row mb-4"> + <div class="col-12 d-flex flex-wrap gap-3 gap-md-4"> + {foreach from=$cookie_categories key=category item=data} + <div class="form-check form-switch d-flex align-items-center flex-shrink-0"> + <input class="form-check-input me-2" type="checkbox" id="toggle{$category|capitalize}" + name="cookie_consent_{$category}" + {if $category == 'essential'}checked disabled aria-disabled="true"{/if}> + <label class="form-check-label me-2 fw-semibold" for="toggle{$category|capitalize}"> + {tr}{$data.name}{/tr} + </label> + <button type="button" class="btn btn-link p-0 text-decoration-none text-dark" + data-bs-toggle="tooltip" data-bs-placement="right" + title="{tr}{$data.description}{/tr}" + aria-label="{tr}{$data.description}{/tr}"> + <i class="fas fa-info-circle"></i> + </button> + </div> + {/foreach} + </div> + </div> + + <div class="row"> + <div class="col-12 d-flex flex-wrap gap-2 justify-content-center justify-content-md-end"> + {if $prefs.cookie_consent_disable eq 'n'} + <button type="submit" class="btn btn-outline-danger" + id="cookie_decline_unnecessary_button"> + {tr}Refuse unnecessary{/tr} + </button> + {/if} + <button type="submit" class="btn btn-secondary" + id="cookie_save_button"> + {tr}Save preferences{/tr} + </button> + <button type="submit" class="btn btn-primary" + id="cookie_consent_preference" name="cookie_consent_preference"> + {tr}Accept all{/tr} + </button> + </div> + </div> + + {if $prefs.cookie_consent_mode neq 'dialog'}</div></div>{/if} + </form> + + {if $prefs.cookie_consent_mode eq 'dialog'}</div></div></div>{/if} </div> {/strip} View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/03ec1741c01a29c304bc533b74569dc1ed293853 -- View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/03ec1741c01a29c304bc533b74569dc1ed293853 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