From 4fc799c765a5ee8d6d17e272d207d2c8c2f76843 Mon Sep 17 00:00:00 2001 From: Matt Blenkinsop Date: Wed, 24 Jan 2024 15:08:56 +0000 Subject: [PATCH] Bug 34647: Replace name attributes with ids This patch replaces name attributes on 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 Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer (cherry picked from commit 8a07455e3beeb58ec934665d301bc76e4ef562a4) Signed-off-by: Fridolin Somers (cherry picked from commit 7317b66b5a311f677107ba9333664bef3a55d317) Signed-off-by: Lucas Gass --- .../prog/en/modules/acqui/booksellers.tt | 2 +- .../prog/en/modules/admin/smart-rules.tt | 4 +-- .../prog/en/modules/reports/catalogue_out.tt | 2 +- .../bootstrap/en/modules/opac-main.tt | 28 +++++++++++++++++++ .../bootstrap/en/modules/opac-memberentry.tt | 2 +- 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt index c0d0ecddba..e4dce8561c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt @@ -77,7 +77,7 @@ [% ELSE %]

[% END %] - + [% IF (supplier.name) %] [% supplier.name | html %] [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index f86b39992a..6871a7e5dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -234,7 +234,7 @@ [% IF note.defined && note != '' %] - View note + View note [% ELSE %] [% END %] @@ -1465,7 +1465,7 @@ var current_column = $("#edit_row td:eq("+i+")"); if ( i == 3 ) { // 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); } else if ( i == 9 ) { // specific processing for Hard due date diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt index 99897e7638..fd64c5358d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tt @@ -76,7 +76,7 @@ [% IF ( mainloo.looptables ) %]
-

Summary

+

Summary

diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt index cca221a4e0..b49d4b6c78 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -89,6 +89,34 @@ [% END %] [% 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 %] +
+ [% SET show_author = Koha.Preference('NewsAuthorDisplay') == 'opac' || Koha.Preference('NewsAuthorDisplay') == 'both' %] + [% FOREACH koha_new IN koha_news.content %] +
+

+ [% IF ( news_item ) %] + [% koha_new.title | html %] + [% ELSE %] + [% koha_new.title | html %] + [% END %] +

+
[% koha_new.content | $raw %]
+
+ Published on [% koha_new.published_on | $KohaDates %] + [% IF ( show_author && koha_new.author ) %] + by [% INCLUDE 'patron-title.inc' patron=koha_new.author %] + [% END %] + [% IF ( news_id ) %] + • Show all news + [% END %] +
+
+ [% END %] [% IF single_news_error %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index c54c052fe3..6fb507b372 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -952,7 +952,7 @@
    [% FOREACH pa IN pa_class.items %] [% FOREACH pa_value IN pa.values %] - [% IF loop.first %][% END %] + [% IF loop.first %][% END %] [% form_id = 'patron-attr-' _ Math.int( Math.rand(1000000) ) %]
  1. [% IF pa.type.mandatory && pa.type.opac_editable %] -- 2.39.5
Group