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

(-)a/circ/circulation.pl (-24 / +4 lines)
Lines 65-93 use List::MoreUtils qw/uniq/; Link Here
65
#
65
#
66
my $query = new CGI;
66
my $query = new CGI;
67
67
68
my $sessionID = $query->cookie("CGISESSID") ;
69
my $session = get_session($sessionID);
70
71
my $override_high_holds     = $query->param('override_high_holds');
68
my $override_high_holds     = $query->param('override_high_holds');
72
my $override_high_holds_tmp = $query->param('override_high_holds_tmp');
69
my $override_high_holds_tmp = $query->param('override_high_holds_tmp');
73
70
74
# branch and printer are now defined by the userenv
71
my $sessionID = $query->cookie("CGISESSID") ;
75
# but first we have to check if someone has tried to change them
72
my $session = get_session($sessionID);
76
73
if (!C4::Context->userenv){
77
my $branch = $query->param('branch');
78
if ($branch){
79
    # update our session so the userenv is updated
80
    $session->param('branch', $branch);
81
    $session->param('branchname', GetBranchName($branch));
82
}
83
84
my $printer = $query->param('printer');
85
if ($printer){
86
    # update our session so the userenv is updated
87
    $session->param('branchprinter', $printer);
88
}
89
90
if (!C4::Context->userenv && !$branch){
91
    if ($session->param('branch') eq 'NO_LIBRARY_SET'){
74
    if ($session->param('branch') eq 'NO_LIBRARY_SET'){
92
        # no branch set we can't issue
75
        # no branch set we can't issue
93
        print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
76
        print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
Lines 162-169 for (@failedreturns) { $return_failed{$_} = 1; } Link Here
162
my $findborrower = $query->param('findborrower') || q{};
145
my $findborrower = $query->param('findborrower') || q{};
163
$findborrower =~ s|,| |g;
146
$findborrower =~ s|,| |g;
164
147
165
$branch  = C4::Context->userenv->{'branch'};  
148
my $branch = C4::Context->userenv->{'branch'};
166
$printer = C4::Context->userenv->{'branchprinter'};
167
149
168
# If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian
150
# If AutoLocation is not activated, we show the Circulation Parameters to chage settings of librarian
169
if (C4::Context->preference("AutoLocation") != 1) {
151
if (C4::Context->preference("AutoLocation") != 1) {
Lines 650-657 $template->param( Link Here
650
    categoryname      => $borrower->{'description'},
632
    categoryname      => $borrower->{'description'},
651
    branch            => $branch,
633
    branch            => $branch,
652
    branchname        => GetBranchName($borrower->{'branchcode'}),
634
    branchname        => GetBranchName($borrower->{'branchcode'}),
653
    printer           => $printer,
654
    printername       => $printer,
655
    was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
635
    was_renewed       => scalar $query->param('was_renewed') ? 1 : 0,
656
    expiry            => $borrower->{'dateexpiry'},
636
    expiry            => $borrower->{'dateexpiry'},
657
    roadtype          => $roadtype,
637
    roadtype          => $roadtype,
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc (-5 lines)
Lines 1-4 Link Here
1
[% USE Branches %]
2
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %][% IF ( CircAutocompl ) %]<script type="text/javascript">
1
[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %][% IF ( CircAutocompl ) %]<script type="text/javascript">
3
//<![CDATA[
2
//<![CDATA[
4
$(document).ready(function(){
3
$(document).ready(function(){
Lines 28-35 $(document).ready(function(){ Link Here
28
    <div class="autocomplete">
27
    <div class="autocomplete">
29
                <input autocomplete="off" id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
28
                <input autocomplete="off" id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
30
                <input id="autocsubmit" type="submit" class="submit" value="Submit" />
29
                <input id="autocsubmit" type="submit" class="submit" value="Submit" />
31
                <input name="branch" value="[% Branches.GetLoggedInBranchcode() %]" type="hidden" />
32
                <input name="printer" value="" type="hidden" />
33
            [% IF ( stickyduedate ) %]
30
            [% IF ( stickyduedate ) %]
34
                <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
31
                <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
35
                <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
32
                <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
Lines 37-44 $(document).ready(function(){ Link Here
37
        </div>
34
        </div>
38
	[% ELSE %]
35
	[% ELSE %]
39
            <input id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
36
            <input id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
40
            <input name="branch" value="[% Branches.GetLoggedInBranchcode() %]" type="hidden" />
41
            <input name="printer" value="" type="hidden" />
42
            [% IF ( stickyduedate ) %]
37
            [% IF ( stickyduedate ) %]
43
            <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
38
            <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
44
            <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
39
            <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-2 lines)
Lines 598-604 No patron matched <span class="ex">[% message %]</span> Link Here
598
598
599
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
599
[% IF (forceallow) %]<input type="hidden" name="forceallow" value="1">[% END %]
600
    <input type="hidden" name="branch" value="[% branch %]" />
600
    <input type="hidden" name="branch" value="[% branch %]" />
601
    <input type="hidden" name="printer" value="[% printer %]" />
602
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
601
    <input type="hidden" name="duedatespec" value="[% duedatespec %]" />
603
    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
602
    <input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
604
603
Lines 738-744 No patron matched <span class="ex">[% message %]</span> Link Here
738
737
739
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
738
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% borrowernumber %]" />
740
          <input type="hidden" name="branch" value="[% branch %]" />
739
          <input type="hidden" name="branch" value="[% branch %]" />
741
          <input type="hidden" name="printer" value="[% printer %]" />
742
          <input type="hidden" name="print" value="maybe" />
740
          <input type="hidden" name="print" value="maybe" />
743
          <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
741
          <input type="hidden" name="debt_confirmed" value="[% debt_confirmed %]" />
744
                [% IF ( CHARGES ) %]
742
                [% IF ( CHARGES ) %]
(-)a/members/routing-lists.pl (-16 / +2 lines)
Lines 21-27 use strict; Link Here
21
#use warnings; FIXME - Bug 2505
21
#use warnings; FIXME - Bug 2505
22
use CGI qw ( -utf8 );
22
use CGI qw ( -utf8 );
23
use C4::Output;
23
use C4::Output;
24
use C4::Auth qw/:DEFAULT get_session/;
24
use C4::Auth qw/:DEFAULT/;
25
use C4::Branch; # GetBranches
25
use C4::Branch; # GetBranches
26
use C4::Members;
26
use C4::Members;
27
use C4::Members::Attributes qw(GetBorrowerAttributes);
27
use C4::Members::Attributes qw(GetBorrowerAttributes);
Lines 32-50 use CGI::Session; Link Here
32
32
33
my $query = new CGI;
33
my $query = new CGI;
34
34
35
my $sessionID = $query->cookie("CGISESSID") ;
36
my $session = get_session($sessionID);
37
38
# branch are now defined by the userenv
39
# but first we have to check if someone has tried to change them
40
41
my $branch = $query->param('branch');
42
if ($branch){
43
    # update our session so the userenv is updated
44
    $session->param('branch', $branch);
45
    $session->param('branchname', GetBranchName($branch));
46
}
47
48
my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
35
my ( $template, $loggedinuser, $cookie ) = get_template_and_user (
49
    {
36
    {
50
        template_name   => 'members/routing-lists.tt',
37
        template_name   => 'members/routing-lists.tt',
Lines 62-68 $findborrower =~ s|,| |g; Link Here
62
49
63
my $borrowernumber = $query->param('borrowernumber');
50
my $borrowernumber = $query->param('borrowernumber');
64
51
65
$branch  = C4::Context->userenv->{'branch'};
52
my $branch = C4::Context->userenv->{'branch'};
66
53
67
# get the borrower information.....
54
# get the borrower information.....
68
my $borrower;
55
my $borrower;
69
- 

Return to bug 16429