Bug 17222: Remove use of onclick from OPAC member entry page
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 <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
8098194125
commit
167be41dcc
1 changed files with 6 additions and 1 deletions
|
@ -265,7 +265,7 @@
|
|||
|
||||
[% UNLESS action == 'edit' && !OPACPatronDetails %]
|
||||
[% UNLESS ( mandatory.defined('dateofbirth') ) %]
|
||||
<a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('borrower_dateofbirth').value='';return false;">Clear date</a>
|
||||
<a href="#" style="font-size:85%;text-decoration:none;" class="cleardate">Clear date</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
@ -983,6 +983,11 @@
|
|||
});
|
||||
[% END %]
|
||||
});
|
||||
|
||||
$(".cleardate").on("click", function(){
|
||||
document.getElementById('borrower_dateofbirth').value='';
|
||||
return false;
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
[% INCLUDE 'calendar.inc' %]
|
||||
|
|
Loading…
Reference in a new issue