View | Details | Raw Unified | Return to bug 23697
Collapse All | Expand All

(-)a/C4/Auth.pm (-1 / +1 lines)
Lines 480-486 sub get_template_and_user { Link Here
480
            AmazonCoverImages                                                          => C4::Context->preference("AmazonCoverImages"),
480
            AmazonCoverImages                                                          => C4::Context->preference("AmazonCoverImages"),
481
            AutoLocation                                                               => C4::Context->preference("AutoLocation"),
481
            AutoLocation                                                               => C4::Context->preference("AutoLocation"),
482
            "BiblioDefaultView" . C4::Context->preference("IntranetBiblioDefaultView") => 1,
482
            "BiblioDefaultView" . C4::Context->preference("IntranetBiblioDefaultView") => 1,
483
            CircAutocompl                                                              => C4::Context->preference("CircAutocompl"),
483
            PatronAutocompletion                                                       => C4::Context->preference("PatronAutocompletion"),
484
            FRBRizeEditions                                                            => C4::Context->preference("FRBRizeEditions"),
484
            FRBRizeEditions                                                            => C4::Context->preference("FRBRizeEditions"),
485
            IndependentBranches                                                        => C4::Context->preference("IndependentBranches"),
485
            IndependentBranches                                                        => C4::Context->preference("IndependentBranches"),
486
            IntranetNav                                                                => C4::Context->preference("IntranetNav"),
486
            IntranetNav                                                                => C4::Context->preference("IntranetNav"),
(-)a/C4/UsageStats.pm (-1 / +1 lines)
Lines 182-188 sub BuildReport { Link Here
182
        TransferWhenCancelAllWaitingHolds
182
        TransferWhenCancelAllWaitingHolds
183
        AllowAllMessageDeletion
183
        AllowAllMessageDeletion
184
        AllowOfflineCirculation
184
        AllowOfflineCirculation
185
        CircAutocompl
185
        PatronAutocompletion
186
        CircAutoPrintQuickSlip
186
        CircAutoPrintQuickSlip
187
        DisplayClearScreenButton
187
        DisplayClearScreenButton
188
        FilterBeforeOverdueReport
188
        FilterBeforeOverdueReport
(-)a/circ/branchtransfers.pl (-1 / +1 lines)
Lines 241-247 $template->param( Link Here
241
    setwaiting              => $setwaiting,
241
    setwaiting              => $setwaiting,
242
    trsfitemloop            => \@trsfitemloop,
242
    trsfitemloop            => \@trsfitemloop,
243
    errmsgloop              => \@errmsgloop,
243
    errmsgloop              => \@errmsgloop,
244
    CircAutocompl           => C4::Context->preference("CircAutocompl"),
244
    PatronAutocompletion    => C4::Context->preference("PatronAutocompletion"),
245
);
245
);
246
246
247
# Checking if there is a Fast Cataloging Framework
247
# Checking if there is a Fast Cataloging Framework
(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 633-639 my $has_modifications = Koha::Patron::Modifications->search( { borrowernumber => Link Here
633
$template->param(
633
$template->param(
634
    debt_confirmed            => $debt_confirmed,
634
    debt_confirmed            => $debt_confirmed,
635
    SpecifyDueDate            => $duedatespec_allow,
635
    SpecifyDueDate            => $duedatespec_allow,
636
    CircAutocompl             => C4::Context->preference("CircAutocompl"),
636
    PatronAutocompletion      => C4::Context->preference("PatronAutocompletion"),
637
    debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
637
    debarments                => scalar GetDebarments({ borrowernumber => $borrowernumber }),
638
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
638
    todaysdate                => output_pref( { dt => dt_from_string()->set(hour => 23)->set(minute => 59), dateformat => 'sql' } ),
639
    has_modifications         => $has_modifications,
639
    has_modifications         => $has_modifications,
(-)a/installer/data/mysql/atomicupdate/bug_23697.perl (+6 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do( "UPDATE systempreferences SET variable="PatronAutocompletion" WHERE variable="CircAutocompl" LIMIT 1" );
4
    SetVersion( $DBversion );
5
    print "Upgrade to $DBversion done (Bug 23697 - Rename CircAutocompl system preference to PatronAutocompletion)\n";
6
}
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 116-122 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
116
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
116
('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'),
117
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
117
('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'),
118
('CheckPrevCheckout','hardno','hardyes|softyes|softno|hardno','By default, for every item checked out, should we warn if the patron has borrowed that item in the past?','Choice'),
118
('CheckPrevCheckout','hardno','hardyes|softyes|softno|hardno','By default, for every item checked out, should we warn if the patron has borrowed that item in the past?','Choice'),
119
('CircAutocompl','1',NULL,'If ON, autocompletion is enabled for the Circulation input','YesNo'),
120
('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'),
119
('CircAutoPrintQuickSlip','qslip',NULL,'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window, Display a print slip window or Clear the screen.','Choice'),
121
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
120
('CircControl','ItemHomeLibrary','PickupLibrary|PatronLibrary|ItemHomeLibrary','Specify the agency that controls the circulation and fines policy','Choice'),
122
('CircSidebar','0',NULL,'Activate or deactivate the navigation sidebar on all Circulation pages','YesNo'),
121
('CircSidebar','0',NULL,'Activate or deactivate the navigation sidebar on all Circulation pages','YesNo'),
Lines 462-467 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
462
('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'),
461
('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'),
463
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
462
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
464
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
463
('PatronAnonymizeDelay','',NULL,'Delay for anonymizing patrons', 'Integer'),
464
('PatronAutocompletion','1','Try|Don\'t try','to guess the patron being entered while typing a patron search for circulation or patron search. Only returns the first 10 results at a time.','YesNo'),
465
('patronimages','0',NULL,'Enable patron images for the Staff Client','YesNo'),
465
('patronimages','0',NULL,'Enable patron images for the Staff Client','YesNo'),
466
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
466
('PatronRemovalDelay','',NULL,'Delay for removing anonymized patrons', 'Integer'),
467
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
467
('PatronSelfModificationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when a patron is editing their information via the OPAC.','free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/js_includes.inc (-1 / +29 lines)
Lines 81-87 Link Here
81
[% END %]
81
[% END %]
82
82
83
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
83
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
84
    [% IF ( CircAutocompl ) %]
84
    [% IF ( PatronAutocompletion ) %]
85
        <script>
85
        <script>
86
            $(document).ready(function(){
86
            $(document).ready(function(){
87
                var obj = $( "#findborrower" ).autocomplete({
87
                var obj = $( "#findborrower" ).autocomplete({
Lines 109-111 Link Here
109
        </script>
109
        </script>
110
    [% END %]
110
    [% END %]
111
[% END %]
111
[% END %]
112
[% IF ( PatronAutocompletion ) %]
113
    <script>
114
    $(document).ready(function(){
115
        var obj = $( "#searchmember" ).autocomplete({
116
            source: "/cgi-bin/koha/circ/ysearch.pl",
117
            minLength: 3,
118
            select: function( event, ui ) {
119
                window.location.href = ui.item.link;
120
            }
121
        }).data( "ui-autocomplete" );
122
        if( obj ) {
123
            obj._renderItem = function( ul, item ) {
124
                item.link = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber;
125
                var cardnumber = ""; 
126
                if( item.cardnumber != "" ){
127
                    // Display card number in parentheses if it exists
128
                    cardnumber = " (" + item.cardnumber + ") ";
129
                }
130
                return $( "<li></li>" )
131
                .data( "ui-autocomplete-item", item )
132
                .append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
133
                .appendTo( ul );
134
            };
135
        }
136
    });
137
    </script>
138
[% END %]
139
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc (-1 / +1 lines)
Lines 2-8 Link Here
2
    <div id="circ_search" class="residentsearch">
2
    <div id="circ_search" class="residentsearch">
3
    <p class="tip">Enter patron card number or partial name:</p>
3
    <p class="tip">Enter patron card number or partial name:</p>
4
    <form action="/cgi-bin/koha/circ/circulation.pl" id="patronsearch" method="post">
4
    <form action="/cgi-bin/koha/circ/circulation.pl" id="patronsearch" method="post">
5
    [% IF ( CircAutocompl ) %]
5
    [% IF ( PatronAutocompletion ) %]
6
    <div class="autocomplete">
6
    <div class="autocomplete">
7
                <input autocomplete="off" id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
7
                <input autocomplete="off" id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
8
                <input id="autocsubmit" type="submit" class="submit" value="Submit" />
8
                <input id="autocsubmit" type="submit" class="submit" value="Submit" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-2 / +2 lines)
Lines 15-25 Circulation: Link Here
15
            - the automatic redirection to another patron when a patron barcode is scanned instead of a book.
15
            - the automatic redirection to another patron when a patron barcode is scanned instead of a book.
16
            - This should not be enabled if you have overlapping patron and book barcodes.
16
            - This should not be enabled if you have overlapping patron and book barcodes.
17
        -
17
        -
18
            - pref: CircAutocompl
18
            - pref: PatronAutocompletion
19
              choices:
19
              choices:
20
                  yes: Try
20
                  yes: Try
21
                  no: "Don't try"
21
                  no: "Don't try"
22
            - to guess the patron being entered while typing a patron search on the circulation screen.
22
            - to guess the patron being entered while typing a patron search for circulation or patron search.
23
            - Only returns the first 10 results at a time.
23
            - Only returns the first 10 results at a time.
24
        -
24
        -
25
            - pref: itemBarcodeInputFilter
25
            - pref: itemBarcodeInputFilter
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-1 / +1 lines)
Lines 1169-1175 Link Here
1169
            });
1169
            });
1170
1170
1171
            [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
1171
            [% UNLESS ( patron || patron.borrowernumber || borrowers || noitems ) %]
1172
                [% IF ( CircAutocompl ) %]
1172
                [% IF ( PatronAutocompletion ) %]
1173
                $( "#patron" ).autocomplete({
1173
                $( "#patron" ).autocomplete({
1174
                    source: "/cgi-bin/koha/circ/ysearch.pl",
1174
                    source: "/cgi-bin/koha/circ/ysearch.pl",
1175
                    minLength: 3,
1175
                    minLength: 3,
(-)a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js (-21 lines)
Lines 96-122 $(document).ready(function(){ Link Here
96
        $("#patronImageEdit").modal("show");
96
        $("#patronImageEdit").modal("show");
97
    });
97
    });
98
98
99
    var obj = $( "#searchmember" ).autocomplete({
100
        source: "/cgi-bin/koha/circ/ysearch.pl",
101
        minLength: 3,
102
        select: function( event, ui ) {
103
            window.location.href = ui.item.link;
104
        }
105
    }).data( "ui-autocomplete" );
106
    if( obj ) {
107
        obj._renderItem = function( ul, item ) {
108
            item.link = "/cgi-bin/koha/circ/circulation.pl?borrowernumber=" + item.borrowernumber;
109
            var cardnumber = "";
110
            if( item.cardnumber != "" ){
111
                // Display card number in parentheses if it exists
112
                cardnumber = " (" + item.cardnumber + ") ";
113
            }
114
            return $( "<li></li>" )
115
            .data( "ui-autocomplete-item", item )
116
            .append( "<a href=\"" + item.link + "\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
117
            .appendTo( ul );
118
        };
119
    }
120
});
99
});
121
100
122
101
(-)a/members/members-home.pl (+1 lines)
Lines 70-75 $template->param( Link Here
70
70
71
$template->param(
71
$template->param(
72
    alphabet => C4::Context->preference('alphabet') || join (' ', 'A' .. 'Z'),
72
    alphabet => C4::Context->preference('alphabet') || join (' ', 'A' .. 'Z'),
73
    PatronAutocompletion => C4::Context->preference('PatronAutocompletion'),
73
    patron_lists => [ GetPatronLists() ],
74
    patron_lists => [ GetPatronLists() ],
74
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
75
    PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
75
);
76
);
(-)a/t/db_dependent/UsageStats.t (-2 / +1 lines)
Lines 435-441 sub mocking_systempreferences_to_a_set_value { Link Here
435
        TransferWhenCancelAllWaitingHolds
435
        TransferWhenCancelAllWaitingHolds
436
        AllowAllMessageDeletion
436
        AllowAllMessageDeletion
437
        AllowOfflineCirculation
437
        AllowOfflineCirculation
438
        CircAutocompl
438
        PatronAutocompletion
439
        CircAutoPrintQuickSlip
439
        CircAutoPrintQuickSlip
440
        DisplayClearScreenButton
440
        DisplayClearScreenButton
441
        FilterBeforeOverdueReport
441
        FilterBeforeOverdueReport
442
- 

Return to bug 23697