From 8ce7790e0bc560cf56fee79af3f82d61ff1cbfc9 Mon Sep 17 00:00:00 2001 From: rangi Date: Tue, 23 May 2006 02:18:21 +0000 Subject: [PATCH] Should be the last of the changes to these files Have to build a table to store borrower->organisation (which are really just other borrowers) links and write a routine to populate that table. May have to make another change to memberentry.pl --- .../prog/en/members/memberentryA.tmpl | 1 + members/memberentry.pl | 23 ++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl b/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl index b0053218d1..cf9150aada 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/members/memberentryA.tmpl @@ -505,6 +505,7 @@ "> " > " > + " > diff --git a/members/memberentry.pl b/members/memberentry.pl index cebf78167f..703a99433f 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -204,6 +204,10 @@ SELECT upperagelimit, $nok=1; } else { $borrowerid = &newmember(%data); + if ($data{'organisations'}){ + # need to add the members organisations + add_member_orgs($borrowerid,$data{'organisations'}); + } logaction($loggedinuser,"MEMBERS","add member", $borrowerid, ""); } } @@ -393,19 +397,21 @@ if ($delete){ if (C4::Context->preference("memberofinstitution")){ my $organisations=get_institutions(); my @orgs; - my %orgs; + my %org_labels; foreach my $organisation (keys %$organisations) { push @orgs,$organisation; - $orgs{$organisation}=$organisations->{$organisation}->{'surname'}; + $org_labels{$organisation}=$organisations->{$organisation}->{'surname'}; } - $member_of_institution=1; - $CGIorganisations = CGI::scrolling_list( -name=>'organisations', - -values=>\@orgs, - -size=>5, - -multiple=>'true' - -labels=>\%orgs, + $CGIorganisations = CGI::scrolling_list( -id => 'organisations', + -name => 'organisations', + -labels => \%org_labels, + -values => \@orgs, + -size => 5, + -multiple => 'true' + + ); } @@ -506,6 +512,7 @@ if ($delete){ citypopup => $citypopup, roadpopup => $roadpopup, contacttype => $data{'contacttype'}, + organisations => $data{'organisations'}, flagloop => \@flagdata, # "contacttype_".$data{'contacttype'} =>" SELECTED ", dateformat => display_date_format(), -- 2.39.5