|
Lines 40-45
use C4::Letters;
Link Here
|
| 40 |
use C4::Branch; # GetBranches |
40 |
use C4::Branch; # GetBranches |
| 41 |
use C4::Form::MessagingPreferences; |
41 |
use C4::Form::MessagingPreferences; |
| 42 |
use Koha::Borrower::Debarments; |
42 |
use Koha::Borrower::Debarments; |
|
|
43 |
use Koha::Cities; |
| 43 |
use Koha::DateUtils; |
44 |
use Koha::DateUtils; |
| 44 |
use Email::Valid; |
45 |
use Email::Valid; |
| 45 |
use Module::Load; |
46 |
use Module::Load; |
|
Lines 83-94
$nodouble = 1 if ($op eq 'modify' or $op eq 'duplicate'); # FIXME hack to rep
Link Here
|
| 83 |
# modifying an existing patron, it ipso facto |
84 |
# modifying an existing patron, it ipso facto |
| 84 |
# isn't a duplicate. Marking FIXME because this |
85 |
# isn't a duplicate. Marking FIXME because this |
| 85 |
# script needs to be refactored. |
86 |
# script needs to be refactored. |
| 86 |
my $select_city = $input->param('select_city'); |
|
|
| 87 |
my $nok = $input->param('nok'); |
87 |
my $nok = $input->param('nok'); |
| 88 |
my $guarantorinfo = $input->param('guarantorinfo'); |
88 |
my $guarantorinfo = $input->param('guarantorinfo'); |
| 89 |
my $step = $input->param('step') || 0; |
89 |
my $step = $input->param('step') || 0; |
| 90 |
my @errors; |
90 |
my @errors; |
| 91 |
my $default_city; |
|
|
| 92 |
my $borrower_data; |
91 |
my $borrower_data; |
| 93 |
my $NoUpdateLogin; |
92 |
my $NoUpdateLogin; |
| 94 |
my $userenv = C4::Context->userenv; |
93 |
my $userenv = C4::Context->userenv; |
|
Lines 531-561
foreach (qw(C A S P I X)) {
Link Here
|
| 531 |
$template->param('typeloop' => \@typeloop, |
530 |
$template->param('typeloop' => \@typeloop, |
| 532 |
no_categories => $no_categories); |
531 |
no_categories => $no_categories); |
| 533 |
if($no_categories){ $no_add = 1; } |
532 |
if($no_categories){ $no_add = 1; } |
| 534 |
# test in city |
|
|
| 535 |
if ( $guarantorid ) { |
| 536 |
$select_city = getidcity($data{city}); |
| 537 |
} |
| 538 |
($default_city=$select_city) if ($step eq 0); |
| 539 |
if (!defined($select_city) or $select_city eq '' ){ |
| 540 |
$default_city = &getidcity($data{'city'}); |
| 541 |
} |
| 542 |
|
533 |
|
| 543 |
my $city_arrayref = GetCities(); |
|
|
| 544 |
if (@{$city_arrayref} ) { |
| 545 |
$template->param( city_cgipopup => 1); |
| 546 |
|
534 |
|
| 547 |
if ($default_city) { # flag the current or default val |
535 |
my $cities = Koha::Cities->search( {}, { order_by => 'city_name' } ); |
| 548 |
for my $city ( @{$city_arrayref} ) { |
|
|
| 549 |
if ($default_city == $city->{cityid}) { |
| 550 |
$city->{selected} = 1; |
| 551 |
last; |
| 552 |
} |
| 553 |
} |
| 554 |
} |
| 555 |
} |
| 556 |
|
| 557 |
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE', $data{streettype} ); |
536 |
my $roadtypes = C4::Koha::GetAuthorisedValues( 'ROADTYPE', $data{streettype} ); |
| 558 |
$template->param( roadtypes => $roadtypes); |
537 |
$template->param( |
|
|
538 |
roadtypes => $roadtypes, |
| 539 |
cities => $cities, |
| 540 |
); |
| 559 |
|
541 |
|
| 560 |
my $default_borrowertitle = ''; |
542 |
my $default_borrowertitle = ''; |
| 561 |
unless ( $op eq 'duplicate' ) { $default_borrowertitle=$data{'title'} } |
543 |
unless ( $op eq 'duplicate' ) { $default_borrowertitle=$data{'title'} } |
|
Lines 683-689
$template->param( step => $step ) if $step; # associate with step to know wh
Link Here
|
| 683 |
$template->param( |
665 |
$template->param( |
| 684 |
BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript |
666 |
BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript |
| 685 |
category_type => $category_type,#to know the category type of the borrower |
667 |
category_type => $category_type,#to know the category type of the borrower |
| 686 |
select_city => $select_city, |
|
|
| 687 |
"$category_type" => 1,# associate with step to know where u are |
668 |
"$category_type" => 1,# associate with step to know where u are |
| 688 |
destination => $destination,#to know wher u come from and wher u must go in redirect |
669 |
destination => $destination,#to know wher u come from and wher u must go in redirect |
| 689 |
check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) |
670 |
check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) |
|
Lines 695-701
$template->param(
Link Here
|
| 695 |
borrowernumber => $borrowernumber, #register number |
676 |
borrowernumber => $borrowernumber, #register number |
| 696 |
guarantorid => ($borrower_data->{'guarantorid'} || $guarantorid), |
677 |
guarantorid => ($borrower_data->{'guarantorid'} || $guarantorid), |
| 697 |
relshiploop => \@relshipdata, |
678 |
relshiploop => \@relshipdata, |
| 698 |
city_loop => $city_arrayref, |
|
|
| 699 |
borrotitlepopup => $borrotitlepopup, |
679 |
borrotitlepopup => $borrotitlepopup, |
| 700 |
guarantorinfo => $guarantorinfo, |
680 |
guarantorinfo => $guarantorinfo, |
| 701 |
flagloop => \@flagdata, |
681 |
flagloop => \@flagdata, |
| 702 |
- |
|
|