koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/members memberentry.pl [rel_3_0]


From: Bruno Toumi
Subject: [Koha-cvs] koha/members memberentry.pl [rel_3_0]
Date: Tue, 14 Nov 2006 15:28:10 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_3_0
Changes by:     Bruno Toumi <btoumi>    06/11/14 15:28:10

Modified files:
        members        : memberentry.pl 

Log message:
        add default  value for branch in borrowers forms 
        (with cookies value)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/members/memberentry.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.38.2.11&r2=1.38.2.12

Patches:
Index: memberentry.pl
===================================================================
RCS file: /sources/koha/koha/members/memberentry.pl,v
retrieving revision 1.38.2.11
retrieving revision 1.38.2.12
diff -u -b -r1.38.2.11 -r1.38.2.12
--- memberentry.pl      3 Nov 2006 10:50:35 -0000       1.38.2.11
+++ memberentry.pl      14 Nov 2006 15:28:10 -0000      1.38.2.12
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: memberentry.pl,v 1.38.2.11 2006/11/03 10:50:35 btoumi Exp $
+# $Id: memberentry.pl,v 1.38.2.12 2006/11/14 15:28:10 btoumi Exp $
 
 # Copyright 2006 SAN OUEST PROVENCE et Paul POULAIN
 #
@@ -364,7 +364,7 @@
        my @branches;
        my @select_branch;
        my %select_branches;
-       my $branches=GetBranches('IS');
+       my $branches=GetBranches();
        my $default;
        # -----------------------------------------------------
        #  the value of ip from the branches hash table
@@ -377,7 +377,8 @@
                if ((not C4::Context->preference("IndependantBranches")) || 
(C4::Context->userenv->{'flags'} == 1)) {
                        push @select_branch, $branch;
                        $select_branches{$branch} = 
$branches->{$branch}->{'branchname'};
-                       $default = $branches->{$branch}->{'branchcode'};
+                       $default=C4::Context->userenv->{'branch'};
+                       
                        } else {
                                push @select_branch,$branch if ($branch eq 
C4::Context->userenv->{'branch'});
                                $select_branches{$branch} = 
$branches->{$branch}->{'branchname'} if ($branch eq 
C4::Context->userenv->{'branch'});
@@ -389,12 +390,12 @@
        #in modify mod :default value from $CGIbranch comes from borrowers table
        #in add mod: default value come from branches table (ip correspendence)
        $default=$data{'branchcode'}  if ($op eq 'modify');
-       
        my $CGIbranch = CGI::scrolling_list(-id    => 'branchcode',
                                           -name   => 'branchcode',
                                           -values => address@hidden,
                                           -labels => \%select_branches,
                                           -size   => 1,
+                                          -override => 1,      
                                           -multiple =>0,
                                           -default => $default,
                                        );




reply via email to

[Prev in Thread] Current Thread [Next in Thread]