Bugzilla – Attachment 89947 Details for
Bug 22953
Markup warning in OPAC user summary template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22953: Markup warning in OPAC user summary template
Bug-22953-Markup-warning-in-OPAC-user-summary-temp.patch (text/plain), 3.73 KB, created by
Owen Leonard
on 2019-05-21 16:36:01 UTC
(
hide
)
Description:
Bug 22953: Markup warning in OPAC user summary template
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-05-21 16:36:01 UTC
Size:
3.73 KB
patch
obsolete
>From 4e8d687c52fd1d66f5ee21fc4e07c2b1c24b5bd5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 21 May 2019 16:29:06 +0000 >Subject: [PATCH] Bug 22953: Markup warning in OPAC user summary template > >This patch makes a minor markup change to the OPAC user summary template >(opac-user.tt) in order to quiet warnings from the HTML validator. The >obsolete name attribute on two links is removed in favor of class names. >The JavaScript has been modified accordingly. > >To reproduce the problem you should have the AllowCheckoutNotes system >preference enabled. Log in to the OPAC as a user who has checkouts and >view the "your summary" page. Run the page through the W3C validation >service: https://validator.w3.org. Either by pasting in the URL for the >search results (if web accessible) or by viewing source, copying, and >pasting into "Validate by Direct Input." > >This patch specifically addresses this warning: > > - "The name attribute is obsolete. Consider putting an id attribute on > the nearest container instead." > >To test, apply the patch and try again to reproduce the validation >errors. Those errors should no longer be present. There should be no >visible change to the page. > >Test the process of adding or editing an note on a checkout. It should >work correctly. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 12aad6b..03847ac 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -346,8 +346,8 @@ > [% IF ( Koha.Preference('AllowCheckoutNotes') ) %] > <td class="note"> > <input type="text" name="note" data-issue_id="[% ISSUE.issue_id | html %]" data-origvalue="[% ISSUE.note | html %]" value="[% ISSUE.note | html %]" readonly> >- <a class="btn" name="js_submitnote" id="save_[% ISSUE.issue_id | html %]" style="display:none;">Submit note</a> >- <a class="btn" name="nonjs_submitnote" href="/cgi-bin/koha/opac-issue-note.pl?issue_id=[% ISSUE.issue_id | url %]">Edit / Create note</a> >+ <a class="btn js_submitnote" id="save_[% ISSUE.issue_id | html %]" style="display:none;">Submit note</a> >+ <a class="btn nonjs_submitnote" href="/cgi-bin/koha/opac-issue-note.pl?issue_id=[% ISSUE.issue_id | url %]">Edit / Create note</a> > </td> > [% END %] > </tr> >@@ -812,7 +812,7 @@ > [% IF ( Koha.Preference('AllowCheckoutNotes') ) %] > > /* If JS enabled, show button, otherwise show link to redirect to a page where note can be submitted */ >- $("a[name='nonjs_submitnote']").hide(); >+ $(".nonjs_submitnote").hide(); > > $("input[name='note']").prop('readonly', false); > $("input[name='note']").keypress(function(e){ >@@ -837,7 +837,7 @@ > } > }); > >- $("a[name='js_submitnote']").click(function(e){ >+ $(".js_submitnote").click(function(e){ > var $self = $(this); > var title = $(this).parent().siblings('.title').html(); > var $noteinput = $(this).siblings('input[name="note"]').first(); >-- >2.1.4
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 22953
:
89947
|
90073
|
90128