Bug 34647: Replace name attributes with ids

This patch replaces name attributes on <a> tags as this is now obsolete
in HTML 5. The recommended practice is to substitute these for ids, as
has been done in this patch

Test plan:
1) Navigate to each page where the link has been amended
2) Check that the link still works as expected

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 8a07455e3b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7317b66b5a)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Matt Blenkinsop 2024-01-24 15:08:56 +00:00 committed by Lucas Gass
parent 8c19934323
commit 4fc799c765
5 changed files with 33 additions and 5 deletions

View file

@ -77,7 +77,7 @@
[% ELSE %] [% ELSE %]
<h2 class="suppliername inactive"> <h2 class="suppliername inactive">
[% END %] [% END %]
<a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | uri %]"> <a id="vendor[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | uri %]">
[% IF (supplier.name) %] [% IF (supplier.name) %]
[% supplier.name | html %] [% supplier.name | html %]
[% ELSE %] [% ELSE %]

View file

@ -234,7 +234,7 @@
</td> </td>
<td> <td>
[% IF note.defined && note != '' %] [% IF note.defined && note != '' %]
<a name="viewnote" data-toggle="popover" title="Note" data-content="[% note | html %]" data-placement="top" data-trigger="hover">View note</a> <a id="viewnote" data-toggle="popover" title="Note" data-content="[% note | html %]" data-placement="top" data-trigger="hover">View note</a>
[% ELSE %]<span>&nbsp;</span>[% END %] [% ELSE %]<span>&nbsp;</span>[% END %]
</td> </td>
<td> <td>
@ -1465,7 +1465,7 @@
var current_column = $("#edit_row td:eq("+i+")"); var current_column = $("#edit_row td:eq("+i+")");
if ( i == 3 ) { if ( i == 3 ) {
// specific processing for the Note column // specific processing for the Note column
var note = $(this).find("a[name='viewnote']").data("content"); var note = $(this).find("a[id='viewnote']").data("content");
$(current_column).find("input[type='text']").val(note); $(current_column).find("input[type='text']").val(note);
} else if ( i == 9 ) { } else if ( i == 9 ) {
// specific processing for Hard due date // specific processing for Hard due date

View file

@ -76,7 +76,7 @@
[% IF ( mainloo.looptables ) %] [% IF ( mainloo.looptables ) %]
<div class="page-section"> <div class="page-section">
<h3><a name="summary" id="summary"></a>Summary</h3> <h3><a id="summary"></a>Summary</h3>
<table id="summary_table"> <table id="summary_table">
<tr> <tr>
<th>Group</th> <th>Group</th>

View file

@ -89,6 +89,34 @@
[% END %] [% END %]
[% IF koha_news.count %] [% IF koha_news.count %]
[% SET koha_news = AdditionalContents.get( category => 'news', location => ['opac_only', 'staff_and_opac'], lang => lang, news_id => news_id ) %]
[% ELSE %]
[% SET koha_news = AdditionalContents.get( category => 'news', location => ['opac_only', 'staff_and_opac'], lang => lang, library => branchcode ) %]
[% END %]
[% IF koha_news.content.count %]
<div id="news" class="newscontainer">
[% SET show_author = Koha.Preference('NewsAuthorDisplay') == 'opac' || Koha.Preference('NewsAuthorDisplay') == 'both' %]
[% FOREACH koha_new IN koha_news.content %]
<div class="newsitem">
<h4 class="newsheader">
[% IF ( news_item ) %]
[% koha_new.title | html %]
[% ELSE %]
<a id="newsitem[% koha_new.id | html %]" href="/cgi-bin/koha/opac-main.pl?news_id=[% koha_new.id | uri %]">[% koha_new.title | html %]</a>
[% END %]
</h4>
<div class="newsbody">[% koha_new.content | $raw %]</div>
<div class="newsfooter">
Published on [% koha_new.published_on | $KohaDates %]
[% IF ( show_author && koha_new.author ) %]
by <span class="newsauthor">[% INCLUDE 'patron-title.inc' patron=koha_new.author %]</span>
[% END %]
[% IF ( news_id ) %]
&bull; <a href="/cgi-bin/koha/opac-main.pl">Show all news</a>
[% END %]
</div>
</div>
[% END %]
[% IF single_news_error %] [% IF single_news_error %]

View file

@ -952,7 +952,7 @@
<ol class="attributes_table"> <ol class="attributes_table">
[% FOREACH pa IN pa_class.items %] [% FOREACH pa IN pa_class.items %]
[% FOREACH pa_value IN pa.values %] [% FOREACH pa_value IN pa.values %]
[% IF loop.first %]<a name="patron-attr-start-[% pa.type.code | html %]"></a>[% END %] [% IF loop.first %]<a id="patron-attr-start-[% pa.type.code | html %]"></a>[% END %]
[% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %] [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
<li data-category_code="[% pa.type.category_code | html %]"> <li data-category_code="[% pa.type.category_code | html %]">
[% IF pa.type.mandatory && pa.type.opac_editable %] [% IF pa.type.mandatory && pa.type.opac_editable %]