From 8e82d339900c22e838fec36457378fbd371fb91b Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 29 Aug 2016 23:22:11 +0000 Subject: [PATCH] Bug 17222: Remove use of onclick from OPAC member entry page MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit There is only one instance on onclick here, and that is the clear date function. To test, make sure clicking 'Clear date' next to Date of Birth works the same before and after the patch. Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 167be41dcc42f8456a69700475eb927593f78fb2) Signed-off-by: Frédéric Demians --- .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 62762feb92..bd4115898c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -270,7 +270,7 @@ [% UNLESS action == 'edit' && !OPACPatronDetails %] [% UNLESS ( mandatory.defined('dateofbirth') ) %] - Clear date + Clear date [% END %] [% END %] @@ -987,6 +987,11 @@ }); [% END %] }); + + $(".cleardate").on("click", function(){ + document.getElementById('borrower_dateofbirth').value=''; + return false; + }); //]]> [% INCLUDE 'calendar.inc' %] -- 2.39.5