Bug 33829: Fix add patron to patron list if PatronAutoComplete is off
When adding patrons to a patron list we get a JS error about undefined variables. We can easily fix this problem by defining them even if the pref is not set. We are enabling the auto complete even if PatronAutoComplete if off. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
a69551e32e
commit
493819b92b
1 changed files with 5 additions and 3 deletions
|
@ -69,12 +69,14 @@
|
||||||
</script>
|
</script>
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% IF ( PatronAutoComplete ) %]
|
<script>
|
||||||
<script>
|
|
||||||
// PatronAutoComplete
|
|
||||||
var defaultPatronSearchFields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]";
|
var defaultPatronSearchFields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]";
|
||||||
var loggedInLibrary = '[% Branches.GetLoggedInBranchcode | html %]';
|
var loggedInLibrary = '[% Branches.GetLoggedInBranchcode | html %]';
|
||||||
var singleBranchMode = '[% singleBranchMode | html %]';
|
var singleBranchMode = '[% singleBranchMode | html %]';
|
||||||
|
</script>
|
||||||
|
[% IF ( PatronAutoComplete ) %]
|
||||||
|
<script>
|
||||||
|
// PatronAutoComplete
|
||||||
var loggedInClass = "";
|
var loggedInClass = "";
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
|
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
|
||||||
|
|
Loading…
Reference in a new issue