Bugzilla – Attachment 174064 Details for
Bug 30699
Fix various HTML validity errors in staff interface templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30699: Fix various HTML validity errors in staff interface templates
Bug-30699-Fix-various-HTML-validity-errors-in-staf.patch (text/plain), 23.09 KB, created by
Aleisha Amohia
on 2024-11-06 03:47:58 UTC
(
hide
)
Description:
Bug 30699: Fix various HTML validity errors in staff interface templates
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-11-06 03:47:58 UTC
Size:
23.09 KB
patch
obsolete
>From 92a5bed9e43efad55908667927303aa21a3ad82a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 30 Aug 2024 17:35:06 +0000 >Subject: [PATCH] Bug 30699: Fix various HTML validity errors in staff > interface templates > >This patch fixes several HTML validity issues in various staff >interface templates. Most of these changes won't be visible in the >interface. > >- Advanced search: > - Remove stray </a> tags > - Fix duplicate IDs by adding loop.index to repeated dropdown menus >- Circulation > - Fix mismatched label and form field id in checkouts table footer > - Fix mismatched label and form field id claim returned modal > - Remove invalid href attribute from button in claim returned modal > - Wrap relatives' checkouts tab in conditional so that panel doesn't > appear when tab has been hidden > - Fix duplicate id attributes in patron messages-related markup > - Remove redundant class attribute from patron messages-related markup >- Acquisitions -> Vendor -> Basket -> Add to basket -> From staged file > - Remove invalid "size" attribute from hidden form fields >- Circulation -> Holds awaiting pickup > - Fix mismatched label and form field id >- Patron -> Accounting -> Pay fine -> Submit cash amount higher than the > charge > - Remove invalid href attribute from button in confirmation modal >- Fix errors in tab markup WRAPPERs in html_helpers.inc to prevent > mismatched aria-labelledby attributes >- Footer language selector: > - Fix markup to correct errors in aria-controls >- Remove invalid href attribute from cookie consent modal > >Sponsored-by: Athens County Public Libraries >Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> >--- > .../intranet-tmpl/prog/en/includes/adv-search.inc | 8 ++++---- > .../prog/en/includes/checkouts-table-footer.inc | 2 +- > .../intranet-tmpl/prog/en/includes/html_helpers.inc | 8 ++++---- > .../intranet-tmpl/prog/en/includes/intranet-bottom.inc | 6 +++--- > .../intranet-tmpl/prog/en/includes/members-toolbar.inc | 6 +++--- > .../prog/en/includes/modals/resolve_return_claim.inc | 4 ++-- > .../prog/en/includes/patron-detail-tabs.inc | 10 ++++++---- > .../intranet-tmpl/prog/en/includes/patron_messages.inc | 8 ++++---- > .../intranet-tmpl/prog/en/includes/search_indexes.inc | 4 ++-- > .../prog/en/modules/acqui/addorderiso2709.tt | 4 ++-- > .../prog/en/modules/catalogue/advsearch.tt | 2 +- > .../prog/en/modules/circ/waitingreserves.tt | 2 +- > .../prog/en/modules/members/paycollect.tt | 2 +- > .../intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- > 14 files changed, 35 insertions(+), 33 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc >index aa48fc49617..64c5e4d647b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/adv-search.inc >@@ -16,18 +16,18 @@ > [% WRAPPER tabs_nav %] > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] > [% WRAPPER tab_item tabname= "circ_search" bt_active= 1 %] >- <i class="fa fa-fw fa-upload" aria-hidden="true"></i> <span class="tab-title">Check out</span></a> >+ <i class="fa fa-fw fa-upload" aria-hidden="true"></i> <span class="tab-title">Check out</span> > [% END %] > [% WRAPPER tab_item tabname= "checkin_search" %] >- <i class="fa fa-fw fa-download" aria-hidden="true"></i> <span class="tab-title">Check in</span></a> >+ <i class="fa fa-fw fa-download" aria-hidden="true"></i> <span class="tab-title">Check in</span> > [% END %] > [% WRAPPER tab_item tabname= "renew_search" %] >- <i class="fa fa-fw fa-retweet" aria-hidden="true"></i> <span class="tab-title">Renew</span></a> >+ <i class="fa fa-fw fa-retweet" aria-hidden="true"></i> <span class="tab-title">Renew</span> > [% END %] > [% END %] > [% IF ( CAN_user_borrowers_edit_borrowers ) %] > [% WRAPPER tab_item tabname= "patron_search" %] >- <i class="fa fa-fw fa-id-card" aria-hidden="true"></i> <span class="tab-title">Search patrons</span></a> >+ <i class="fa fa-fw fa-id-card" aria-hidden="true"></i> <span class="tab-title">Search patrons</span> > [% END %] > [% END %] > [% END # /WRAPPER tabs_nav %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >index c12c14a631c..f4029f580f6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc >@@ -11,7 +11,7 @@ > [% END %] > <div class="date-select"> > <p><label for="newduedate">Renewal due date:</label> <input type="text" size="20" id="newduedate" name="newduedate" value="" class="flatpickr" data-flatpickr-enable-time="true"/></p> >- <p id="newonholdduedate"><label for="newonholdduedate">On hold due date:</label> <input type="text" size="20" name="newonholdduedate" value="" class="flatpickr" data-flatpickr-enable-time="true" /></p> >+ <p id="newonholdduedate"><label for="newonholdduedatefield">On hold due date:</label> <input type="text" size="20" name="newonholdduedate" value="" id="newonholdduedatefield" class="flatpickr" data-flatpickr-enable-time="true" /></p> > <p><label for="exemptfine">Forgive fines on return:</label> <input type="checkbox" id="exemptfine" name="exemptfine" value="1" /></p> > </div> > </td> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index 12eba7fa6d4..d5af13c7dc6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -395,9 +395,9 @@ > [% END %] > [% IF ( bt_active ) %] > [% IF (linktab) %] >- <a class="nav-link active" href="?tab=[% tabname | url %]" id="[% tabname | uri %]-tab"> >+ <a class="nav-link active" href="?tab=[% tabname | url %]" id="[% tabname | html %]-tab"> > [% ELSE %] >- <a class="nav-link active" href="#[% tabname | uri %]_panel" id="[% tabname | uri %]-tab" data-tabname="[% tabname | uri %]" aria-controls="[% tabname | uri %]_panel" role="tab" data-bs-toggle="tab" data-bs-target="#[% tabname | uri %]_panel"> >+ <a class="nav-link active" href="#[% tabname | uri %]_panel" id="[% tabname | html %]-tab" data-tabname="[% tabname | uri %]" aria-controls="[% tabname | uri %]_panel" role="tab" data-bs-toggle="tab" data-bs-target="#[% tabname | uri %]_panel"> > [% END %] > [% ELSE %] > [% IF (linktab) %] >@@ -420,9 +420,9 @@ > > [% BLOCK tab_panel %] > [% IF ( bt_active ) %] >- <div class="tab-pane show active" id="[% tabname | html %]_panel" role="tabpanel" aria-labelledby="[% tabname | html %]" tabindex="0"> >+ <div class="tab-pane show active" id="[% tabname | html %]_panel" role="tabpanel" aria-labelledby="[% tabname | html %]-tab" tabindex="0"> > [% ELSE %] >- <div class="tab-pane" id="[% tabname | html %]_panel" role="tabpanel" aria-labelledby="[% tabname | html %]" tabindex="0"> >+ <div class="tab-pane" id="[% tabname | html %]_panel" role="tabpanel" aria-labelledby="[% tabname | html %]-tab" tabindex="0"> > [% END %] > [% content| $raw %] > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >index 554825e2024..cb6b50ae30f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc >@@ -13,10 +13,10 @@ > [% UNLESS ( one_language_enabled ) %] > <div id="changelanguage" class="navbar navbar-expand navbar-light bg-light"> > <div class="container-fluid"> >- <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> >+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#nav_lang_menu" aria-controls="nav_lang_menu" aria-expanded="false" aria-label="Toggle navigation"> > <span class="navbar-toggler-icon"></span> > </button> >- <div class="collapse navbar-collapse"> >+ <div class="collapse navbar-collapse" id="nav_lang_menu"> > <ul id="i18nMenu" class="navbar-nav me-auto"> > [% FOREACH languages_loo IN languages_loop %] > [% IF ( languages_loo.group_enabled ) %] >@@ -149,7 +149,7 @@ > <button type="button" class="btn btn-primary consentAcceptAll">Accept all cookies</button> > <button type="button" class="btn btn-success" id="consentAcceptSelected">Accept selected non-essential cookies</button> > [% END %] >- <a type="button" href="#" class="btn btn-secondary consentCloseModal">Cancel</a> >+ <button type="button" class="btn btn-secondary consentCloseModal">Cancel</button> > </div> > </div> > </div> <!-- /.modal-content --> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index 3d6ea935f9c..4cb8d77c00b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -46,7 +46,7 @@ > [% END %] > > [% IF CAN_user_borrowers_edit_borrowers %] >- <a id="addnewmessageLabel" href="#add_message_form" data-bs-toggle="modal" class="btn btn-default"><i class="fa-solid fa-comment"></i> Add message</a> >+ <a id="toolbar_addnewmessageLabel" href="#add_message_form" data-bs-toggle="modal" class="btn btn-default"><i class="fa-solid fa-comment"></i> Add message</a> > [% END %] > > [% IF Koha.Preference('CurbsidePickup') %] >@@ -129,7 +129,7 @@ > </li> > [% ELSE %] > <li data-bs-toggle="tooltip" data-bs-placement="left" title="Patron is an adult"> >- <a class="dropdown-item disabled" aria-disabled="true" id="updatechild" href="#">Update child to adult patron</a> >+ <button class="dropdown-item disabled" aria-disabled="true" id="updatechild">Update child to adult patron</button> > </li> > [% END %] > [% END %] >@@ -150,7 +150,7 @@ > </div> > > <!-- Modal --> >-<div id="add_message_form" class="modal" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel" aria-hidden="true"> >+<div id="add_message_form" class="modal" tabindex="-1" role="dialog" aria-labelledby="addnewmessageLabel toolbar_addnewmessageLabel" aria-hidden="true"> > <div class="modal-dialog modal-lg"> > <div class="modal-content modal-lg"> > <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/resolve_return_claim.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/resolve_return_claim.inc >index 89d9fc9530d..53973a92427 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/resolve_return_claim.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/resolve_return_claim.inc >@@ -9,7 +9,7 @@ > <div class="modal-body"> > > <div class="form-group"> >- <label for="claims-returned-resolved-code">Resolution</label> >+ <label for="claims-returned-resolved-modal-resolved-code">Resolution</label> > [% SET resolutions = AuthorisedValues.GetAuthValueDropbox('RETURN_CLAIM_RESOLUTION') %] > <select class="form-select" id="claims-returned-resolved-modal-resolved-code"> > [% FOREACH r IN resolutions %] >@@ -35,7 +35,7 @@ > <i id="claims-returned-resolved-modal-btn-submit-spinner" class="fa fa-spinner fa-pulse fa-fw" style="display:none"></i> > Resolve claim > </button> >- <button class="btn btn-default deny cancel" href="#" data-bs-dismiss="modal"><i class="fa fa-times"></i> Cancel</button> >+ <button class="btn btn-default deny cancel" data-bs-dismiss="modal"><i class="fa fa-times"></i> Cancel</button> > </div> > </div> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc >index bf6de17daf8..68f5e546306 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc >@@ -90,9 +90,11 @@ > [% INCLUDE "checkouts-table.inc" %] > [% END # /tab_panel# %] > >- [% WRAPPER tab_panel tabname="relatives-issues" %] >- [% INCLUDE "relatives-issues-table.inc" %] >- [% END # /tab_panel# %] >+ [% IF relatives_issues_count %] >+ [% WRAPPER tab_panel tabname="relatives-issues" %] >+ [% INCLUDE "relatives-issues-table.inc" %] >+ [% END # /tab_panel# %] >+ [% END %] > > [% IF ( guarantees_fines ) %] > [% WRAPPER tab_panel tabname="guarantees_finesandcharges" %] >@@ -169,7 +171,7 @@ > [% IF hold_cancellation.count %] > <label for="cancellation-reason">Cancellation reason:</label> > <input type="hidden" name="op" value="cud-cancelall" /> >- <select name="cancellation-reason"> >+ <select name="cancellation-reason" id="cancellation-reason"> > <option value="">No reason given</option> > [% FOREACH reason IN hold_cancellation %] > <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >index b64f4f0f92a..bcff7ad904a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc >@@ -379,7 +379,7 @@ > <div id="edit_message_form_[% pm.message_id | html %]" class="modal" tabindex="-1" aria-labelledby="#edit_message_form_[% patron_message.message_id | html %]" aria-hidden="true"> > <div class="modal-dialog"> > <div class="modal-content"> >- <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="message_form" name="message_f"> >+ <form method="post" action="/cgi-bin/koha/circ/add_message.pl" id="edit_message_form" name="message_f"> > [% INCLUDE 'csrf-token.inc' %] > <input type="hidden" name="op" value="cud-edit_message"> > <input type="hidden" name="message_id" value="[% pm.message_id | html %]"/> >@@ -388,9 +388,9 @@ > </div> > <div class="modal-body"> > <div class="form-group"> >- <label for="message_type"> >+ <label for="edit_message_type"> > Message is for: >- <select name="message_type" id="message_type" disabled> >+ <select name="message_type" id="edit_message_type" disabled> > [% IF pm.message_type == "L" %] > <option value="L" selected="selected">Staff - Internal note</option> > [% ELSE %] >@@ -406,7 +406,7 @@ > </label> > </div> > <div class="form-group"> >- <textarea rows="3" class="modal-textarea" name="borrower_message" id="borrower_message" >[% pm.message | html %]</textarea> >+ <textarea rows="3" class="modal-textarea" name="borrower_message" id="edit_borrower_message" >[% pm.message | html %]</textarea> > </div> > </div> > <div class="modal-footer"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc >index f668fdcc9ba..2719a717deb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc >@@ -1,8 +1,8 @@ > [% USE Koha %] > [% IF refiner %] >- <select class="advsearch" name="idx" id="refiner_idx"> >+ <select class="advsearch" name="idx" id="refiner_idx_[% index | html %]"> > [% ELSE %] >- <select class="advsearch" name="idx" id="idx"> >+ <select class="advsearch" name="idx" id="idx_[% index | html %]"> > [% END %] > [% IF ms_kw %] > <option selected="selected" value="kw">Keyword</option> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index 1cef2cd82d1..e501ad41bf3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -208,7 +208,7 @@ > <li class="fund"> > [% IF ( close ) %] > <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label> >- <input type="hidden" size="20" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %] >+ <input type="hidden" name="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %] > [% ELSE %] > <label for="fund_record_[% biblio.import_record_id | html %]">Fund: </label> > <select id="fund_record_[% biblio.import_record_id | html %]" name="budget_id_[% biblio.import_record_id | html %]"> >@@ -486,7 +486,7 @@ > [% IF ( close ) %] > <li> > <span class="label">Fund: </span> >- <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %] >+ <input type="hidden" name="budget_id" id="budget_id" value="[% budget_id | html %]" />[% Budget_name | html %] > </li> > [% ELSE %] > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >index 6e2edeb67e4..9e5562ae648 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt >@@ -175,7 +175,7 @@ > <div> > [% END %] > [% SET preselect = 'ms_' _ indexes.${loop.index}.replace(',','comma') %] >- [% INCLUDE 'search_indexes.inc' ${preselect} = 1 %] >+ [% INCLUDE 'search_indexes.inc' ${preselect} = 1 index = loop.index %] > <input type="text" size="30" name="q" title="Enter search terms" value="[% query | html %]" /> > [% IF ( expanded_options ) %] > [% IF ( loop.last ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >index 80d7bd91d62..828bb000ea8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -189,7 +189,7 @@ > <fieldset class="action"> > [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] > [% IF hold_cancellation.count %] >- <label for="cancellation-reason">Cancellation reason: </label> >+ <label for="modal-cancellation-reason">Cancellation reason: </label> > <select class="cancellation-reason" name="modal-cancellation-reason" id="modal-cancellation-reason"> > <option value="">No reason given</option> > [% FOREACH reason IN hold_cancellation %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >index 351a48cec20..ff91689adee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt >@@ -425,7 +425,7 @@ > </div> > <div class="modal-footer"> > <button class="btn btn-default approve" id="modal_submit" type="button"><i class="fa fa-check"></i> Yes</button> >- <button class="btn btn-default deny cancel" href="#" data-bs-dismiss="modal"><i class="fa fa-times"></i> No</button> >+ <button class="btn btn-default deny cancel" data-bs-dismiss="modal"><i class="fa fa-times"></i> No</button> > </div> > </div> > </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 8d1c1fddc3f..2fcc09479f7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1451,7 +1451,7 @@ > <fieldset class="action"> > [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] > [% IF hold_cancellation.count %] >- <label for="cancellation-reason">Cancellation reason: </label> >+ <label for="modal-cancellation-reason">Cancellation reason: </label> > <select class="cancellation-reason" name="cancellation-reason" id="modal-cancellation-reason"> > <option value="">No reason given</option> > [% FOREACH reason IN hold_cancellation %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30699
:
170923
|
172679
| 174064 |
174323