Lines 651-685
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 |
|
|
|
661 |
my @categoryloop; |
662 |
while ( my $patron_category = $patron_categories->next ) { |
663 |
push @categoryloop, |
664 |
{ 'categorycode' => $patron_category->categorycode, |
665 |
'categoryname' => $patron_category->description, |
666 |
'effective_min_password_length' => $patron_category->effective_min_password_length, |
667 |
'effective_require_strong_password' => $patron_category->effective_require_strong_password, |
668 |
'categorycodeselected' => |
669 |
( defined($categorycode) && $patron_category->categorycode eq $categorycode ), |
670 |
}; |
671 |
} |
672 |
my %typehash; |
673 |
$typehash{'typename'} = $category_type; |
674 |
my $typedescription = "typename_" . $typehash{'typename'}; |
675 |
$typehash{'categoryloop'} = \@categoryloop; |
676 |
push @typeloop, |
677 |
{ 'typename' => $category_type, |
678 |
$typedescription => 1, |
679 |
'categoryloop' => \@categoryloop |
680 |
}; |
681 |
} |
660 |
} |
682 |
|
661 |
my $categories; |
683 |
$template->param( |
662 |
$template->param( |
684 |
patron_categories => $categories, |
663 |
patron_categories => $categories, |
685 |
no_categories => $no_categories, |
664 |
no_categories => $no_categories, |
Lines 779-787
$template->param( step => $step ) if $step; # associate with step to know wh
Link Here
|
779 |
|
758 |
|
780 |
$template->param( |
759 |
$template->param( |
781 |
BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript |
760 |
BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript |
782 |
category_type => $category_type,#to know the category type of the borrower |
761 |
destination => $destination,#to know where u come from and wheree u must go in redirect |
783 |
"$category_type" => 1,# associate with step to know where u are |
|
|
784 |
destination => $destination,#to know where u come from and where u must go in redirect |
785 |
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) |
786 |
"op$op" => 1); |
763 |
"op$op" => 1); |
787 |
|
764 |
|
788 |
- |
|
|