Bugzilla – Attachment 158618 Details for
Bug 35280
OPAC patron entry form: Patron attributes "clear" link broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35280: Fix patron attributes "clear" link in OPAC patron entry form
Bug-35280-Fix-patron-attributes-clear-link-in-OPAC.patch (text/plain), 2.09 KB, created by
David Nind
on 2023-11-07 20:06:28 UTC
(
hide
)
Description:
Bug 35280: Fix patron attributes "clear" link in OPAC patron entry form
Filename:
MIME Type:
Creator:
David Nind
Created:
2023-11-07 20:06:28 UTC
Size:
2.09 KB
patch
obsolete
>From 2a2e855510cdce8bb75cf7c43c05285706eead00 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 7 Nov 2023 17:07:17 +0000 >Subject: [PATCH] Bug 35280: Fix patron attributes "clear" link in OPAC patron > entry form > >This patch makes a minor correction to the JavaScript controlling the >behavior of the "clear" link which appears on the patron entry form next >to patron attribute <select>s or <textarea>s which are editable in the >OPAC. > >To test, apply the patch and create patron attributes >which have both "Display in OPAC" and "Editable in OPAC" checked. > >- Create one which is tied to an authorized value, and one which isn't. >- Log in to the OPAC and click the "Personal details" tab. >- In the entry form, find the patron attribute fields under the > Additional information" heading.. >- Select a value in the dropdown, and enter text in the textarea. >- Confirm that clicking the corresponding "Clear" link for each works as > expected. > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > >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 fd9587ce3d..02c81192a7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -1199,12 +1199,11 @@ > [% END %] > [% END %] > >- $(".patron-attributes").on( 'click', '.clear-attribute', function() { >+ $(".patron-attributes").on( 'click', '.clear-attribute', function(e) { >+ e.preventDefault(); > $(this).parent() >- .find('textarea').attr('value', '').end() >- .find('select').attr('value', '').end(); >- >- return false; >+ .find('textarea').val("").end() >+ .find('select').val("").end(); > } ); > > $(".patron-attributes").on( 'click', '.clone-attribute', function() { >-- >2.30.2
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 35280
:
158609
|
158618
|
158623