@@ -, +, @@ in another patch --- Koha/Schema/Result/Category.pm | 4 ---- members/memberentry.pl | 29 +++-------------------------- 2 files changed, 3 insertions(+), 30 deletions(-) --- a/Koha/Schema/Result/Category.pm +++ a/Koha/Schema/Result/Category.pm @@ -374,10 +374,6 @@ __PACKAGE__->has_many( # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-23 16:29:27 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SKWF2QpqQtXoujwurKFQhA -__PACKAGE__->add_columns( - '+canbeguarantee' => { is_boolean => 1 } -); - sub koha_object_class { 'Koha::Patron::Category'; } --- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -651,35 +651,14 @@ if(!defined($data{'sex'})){ my @typeloop; my $no_categories = 1; -my $no_add; + foreach my $category_type (qw(C A S P I X)) { my $categories_limits = { category_type => $category_type }; $categories_limits->{canbeguarantee} = 1 if ($guarantor_id); my $patron_categories = Koha::Patron::Categories->search_with_library_limits( $categories_limits, {order_by => ['categorycode']} ); $no_categories = 0 if $patron_categories->count > 0; - - my @categoryloop; - while ( my $patron_category = $patron_categories->next ) { - push @categoryloop, - { 'categorycode' => $patron_category->categorycode, - 'categoryname' => $patron_category->description, - 'effective_min_password_length' => $patron_category->effective_min_password_length, - 'effective_require_strong_password' => $patron_category->effective_require_strong_password, - 'categorycodeselected' => - ( defined($categorycode) && $patron_category->categorycode eq $categorycode ), - }; - } - my %typehash; - $typehash{'typename'} = $category_type; - my $typedescription = "typename_" . $typehash{'typename'}; - $typehash{'categoryloop'} = \@categoryloop; - push @typeloop, - { 'typename' => $category_type, - $typedescription => 1, - 'categoryloop' => \@categoryloop - }; } - +my $categories; $template->param( patron_categories => $categories, no_categories => $no_categories, @@ -779,9 +758,7 @@ $template->param( step => $step ) if $step; # associate with step to know wh $template->param( BorrowerMandatoryField => C4::Context->preference("BorrowerMandatoryField"),#field to test with javascript - category_type => $category_type,#to know the category type of the borrower - "$category_type" => 1,# associate with step to know where u are - destination => $destination,#to know where u come from and where u must go in redirect + destination => $destination,#to know where u come from and wheree u must go in redirect check_member => $check_member,#to know if the borrower already exist(=>1) or not (=>0) "op$op" => 1); --