Lines 651-663
if(!defined($data{'sex'})){
Link Here
|
651 |
|
651 |
|
652 |
my @typeloop; |
652 |
my @typeloop; |
653 |
my $no_categories = 1; |
653 |
my $no_categories = 1; |
654 |
my $no_add; |
654 |
|
655 |
foreach my $category_type (qw(C A S P I X)) { |
655 |
foreach my $category_type (qw(C A S P I X)) { |
656 |
my $categories_limits = { category_type => $category_type }; |
656 |
my $categories_limits = { category_type => $category_type }; |
657 |
$categories_limits->{canbeguarantee} = 1 if ($guarantor_id); |
657 |
$categories_limits->{canbeguarantee} = 1 if ($guarantor_id); |
658 |
my $patron_categories = Koha::Patron::Categories->search_with_library_limits( $categories_limits, {order_by => ['categorycode']} ); |
658 |
my $patron_categories = Koha::Patron::Categories->search_with_library_limits( $categories_limits, {order_by => ['categorycode']} ); |
659 |
$no_categories = 0 if $patron_categories->count > 0; |
659 |
$no_categories = 0 if $patron_categories->count > 0; |
660 |
|
660 |
} |
|
|
661 |
my $categories; |
661 |
$template->param( |
662 |
$template->param( |
662 |
patron_categories => $categories, |
663 |
patron_categories => $categories, |
663 |
no_categories => $no_categories, |
664 |
no_categories => $no_categories, |
Lines 751-766
if (C4::Context->preference('EnhancedMessagingPreferences')) {
Link Here
|
751 |
} |
752 |
} |
752 |
|
753 |
|
753 |
$template->param( borrower_data => \%data ); |
754 |
$template->param( borrower_data => \%data ); |
754 |
$template->param( "show_guarantor" => $category ? $category->can_be_guarantee : 1); # associate with step to know where you are |
|
|
755 |
$template->param( "show_guarantor" => $categorycode ? Koha::Patron::Categories->find($categorycode)->canbeguarantee : 1); # associate with step to know where you are |
755 |
$template->param( "show_guarantor" => $categorycode ? Koha::Patron::Categories->find($categorycode)->canbeguarantee : 1); # associate with step to know where you are |
756 |
$template->param( "step_$step" => 1) if $step; # associate with step to know where u are |
756 |
$template->param( "step_$step" => 1) if $step; # associate with step to know where u are |
757 |
$template->param( step => $step ) if $step; # associate with step to know where u are |
757 |
$template->param( step => $step ) if $step; # associate with step to know where u are |
758 |
|
758 |
|
759 |
$template->param( |
759 |
$template->param( |
760 |
BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript |
760 |
BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript |
761 |
category_type => $category_type,#to know the category type of the borrower |
761 |
destination => $destination,#to know wheree u come from and wheree u must go in redirect |
762 |
"$category_type" => 1,# associate with step to know where u are |
|
|
763 |
destination => $destination,#to know where u come from and where u must go in redirect |
764 |
check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) |
762 |
check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) |
765 |
"op$op" => 1); |
763 |
"op$op" => 1); |
766 |
|
764 |
|
767 |
- |
|
|