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>
[% 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 %]
});
[% END %]
});
+
+ $(".cleardate").on("click", function(){
+ document.getElementById('borrower_dateofbirth').value='';
+ return false;
+ });
//]]>
</script>
[% INCLUDE 'calendar.inc' %]