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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/guarantor_search.tmpl (-2 / +3 lines)
Lines 6-12 Link Here
6
    </style>
6
    </style>
7
    <script type="text/javascript">
7
    <script type="text/javascript">
8
        <!--
8
        <!--
9
        function fillguarantor(id, surname, firstname, streetnumber, address, city, zipcode) {
9
        function fillguarantor(id, surname, firstname, streetnumber, address, city, zipcode, branchcode) {
10
            var $ = window.opener.$;
10
            var $ = window.opener.$;
11
            var form = $('#entryform').get(0);
11
            var form = $('#entryform').get(0);
12
12
Lines 32-37 Link Here
32
            form.address.value = address;
32
            form.address.value = address;
33
            form.city.value = city;
33
            form.city.value = city;
34
            form.zipcode.value = zipcode;
34
            form.zipcode.value = zipcode;
35
            form.branchcode.value = branchcode;
35
36
36
            form.guarantorsearch.value = 'Change';
37
            form.guarantorsearch.value = 'Change';
37
            self.close();
38
            self.close();
Lines 76-82 Link Here
76
				<td><p><!-- TMPL_VAR NAME="address" --> <!-- TMPL_VAR NAME="city" --></p></td>
77
				<td><p><!-- TMPL_VAR NAME="address" --> <!-- TMPL_VAR NAME="city" --></p></td>
77
                <td>
78
                <td>
78
                    <form action="">
79
                    <form action="">
79
                        <input type="button" onclick="fillguarantor('<!-- TMPL_VAR NAME="borrowernumber" -->', '<!-- TMPL_VAR NAME="surname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="firstname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="streetnumber" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="address" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="city" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="zipcode" ESCAPE=JS -->'); return false;" value="Select"/>
80
                        <input type="button" onclick="fillguarantor('<!-- TMPL_VAR NAME="borrowernumber" -->', '<!-- TMPL_VAR NAME="surname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="firstname" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="streetnumber" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="address" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="city" ESCAPE=JS -->', '<!-- TMPL_VAR NAME="zipcode" ESCAPE=JS -->','<!-- TMPL_VAR NAME="branchcode" ESCAPE=JS -->'); return false;" value="Select"/>
80
                    </form>
81
                    </form>
81
                </td>
82
                </td>
82
			</tr>
83
			</tr>
(-)a/members/memberentry.pl (-4 / +5 lines)
Lines 374-380 if ($nok or !$nodouble){ Link Here
374
} 
374
} 
375
if (C4::Context->preference("IndependantBranches")) {
375
if (C4::Context->preference("IndependantBranches")) {
376
    my $userenv = C4::Context->userenv;
376
    my $userenv = C4::Context->userenv;
377
    if ($userenv->{flags} % 2 != 1 && $data{branchcode}){
377
    if ($userenv->{flags} % 2 != 1 && $data{'branchcode'}){
378
        unless ($userenv->{branch} eq $data{'branchcode'}){
378
        unless ($userenv->{branch} eq $data{'branchcode'}){
379
            print $input->redirect("/cgi-bin/koha/members/members-home.pl");
379
            print $input->redirect("/cgi-bin/koha/members/members-home.pl");
380
            exit;
380
            exit;
Lines 493-499 my $borrotitlepopup = CGI::popup_menu(-name=>'title', Link Here
493
        -default=>$default_borrowertitle
493
        -default=>$default_borrowertitle
494
        );    
494
        );    
495
495
496
my @relationships = split /,|\|/, C4::Context->preference('BorrowerRelationship');
496
my @relationships = split /,|\|/, C4::Context->preference('borrowerRelationship');
497
my @relshipdata;
497
my @relshipdata;
498
while (@relationships) {
498
while (@relationships) {
499
  my $relship = shift @relationships || '';
499
  my $relship = shift @relationships || '';
Lines 549-555 if(scalar(@select_branch) > 0){ Link Here
549
# --------------------------------------------------------------------------------------------------------
549
# --------------------------------------------------------------------------------------------------------
550
  #in modify mod :default value from $CGIbranch comes from borrowers table
550
  #in modify mod :default value from $CGIbranch comes from borrowers table
551
  #in add mod: default value come from branches table (ip correspendence)
551
  #in add mod: default value come from branches table (ip correspendence)
552
$default=$data{'branchcode'}  if ($op eq 'modify' || ($op eq 'add' && $category_type eq 'C'));
552
if (defined ($data{'branchcode'}) and ( $op eq 'modify' || ( $op eq 'add' && $category_type eq 'C' ) )) {
553
    $default = $data{'branchcode'};
554
}
553
$CGIbranch = CGI::scrolling_list(-id    => 'branchcode',
555
$CGIbranch = CGI::scrolling_list(-id    => 'branchcode',
554
            -name   => 'branchcode',
556
            -name   => 'branchcode',
555
            -values => \@select_branch,
557
            -values => \@select_branch,
556
- 

Return to bug 6116