Bug 36909: Eliminate duplicate ID in cookie consent markup

This patch changes markup and CSS in the OPAC and staff client to
eliminate HTML validator warnings about duplicate ids.

To test, apply the patch and rebuild all CSS (Bug 36909: Eliminate
duplicate ID in cookie consent markup).

- If necessary, set the "CookieConsent" system preference to "Require."
- Open the OPAC in a new private window (to prevent previous consents
  from hiding the consent messages).
- You should see a cookie consent bar across the bottom of the page. It
  should look correct, and its contents should reflow well at various
  browser widths.
- Click "Accept all cookies."
- In the header you should now see a "Your cookies" link.
- Click it and confirm that the contents of the modal look correct and
  reflow well at various browser widths.

- Perform the same tests in the staff interface.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 984960351e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2024-05-21 14:47:21 +00:00 committed by Lucas Gass
parent 84814bbef3
commit 1ad2dd1a6a
5 changed files with 8 additions and 8 deletions

View File

@ -4688,7 +4688,7 @@ div .suggestion_note {
}
}
#consentButtons {
.consentButtons {
flex-grow: 1;
margin-top: 10px;
text-align: left;
@ -4832,7 +4832,7 @@ div .suggestion_note {
@import "forms";
@media only screen and ( min-width: 608px ) {
#consentButtons {
.consentButtons {
text-align: right;
white-space: nowrap;
}

View File

@ -92,7 +92,7 @@
[%- END -%]
</div>
[% END %]
<div id="consentButtons">
<div class="consentButtons">
[% IF ( JSConsents.all('staffConsent').size ) %]
<button type="button" class="btn btn-primary consentAcceptAll">Accept all cookies</button>
[% END %]
@ -131,7 +131,7 @@
</div>
</div>
<div class="modal-footer">
<div id="consentButtons">
<div class="consentButtons">
<button type="button" class="btn btn-primary consentAcceptEssential">Accept essential cookies</button>
[% IF ( JSConsents.all('staffConsent').size ) %]
<button type="button" class="btn btn-primary consentAcceptAll">Accept all cookies</button>

View File

@ -279,7 +279,7 @@
}
#consentButtons {
.consentButtons {
text-align: right;
white-space: nowrap;
}

View File

@ -2949,7 +2949,7 @@ $star-selected: #EDB867;
}
}
#consentButtons {
.consentButtons {
flex-grow: 1;
margin-top: 10px;
text-align: left;

View File

@ -468,7 +468,7 @@
[% PROCESS koha_news_block news => CookieConsentBar %]
</div>
[% END %]
<div id="consentButtons">
<div class="consentButtons">
[% IF ( JSConsents.all('opacConsent').size ) %]
<button type="button" class="btn btn-primary consentAcceptAll">Accept all cookies</button>
[% END %]
@ -505,7 +505,7 @@
</div>
</div>
<div class="modal-footer">
<div id="consentButtons">
<div class="consentButtons">
<button type="button" class="btn btn-primary consentAcceptEssential">Accept essential cookies</button>
[% IF ( JSConsents.all('opacConsent').size ) %]
<button type="button" class="btn btn-primary consentAcceptAll">Accept all cookies</button>