@@ -, +, @@ 1 - Edit a patron, note the 'Lost card' and 'Gone no address' fields 2 - Edit syspref BorrowerunwantedField 3 - Set gonenoaddress and lost as unwanted 4 - Edit patron, the fields remain 5 - Apply patch 6 - Edit a patron, fields are hidden 7 - Unhide one of the fields 8 - Edit a patron and confirm it shows and saves correctly 9 - Unhide the other field --- .../prog/en/modules/members/memberentrygen.tt | 56 ++++++++++++++----- members/memberentry.pl | 24 -------- 2 files changed, 41 insertions(+), 39 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1309,38 +1309,64 @@ legend:hover { [% END # UNLESS nouserid && nopassword && !CanUpdatePasswordExpiration %] - [% UNLESS ( opadd || opduplicate ) %] + [% UNLESS ( opadd || opduplicate || ( nogonenoaddress && nolost ) ) %]
Patron account flags
    - [% FOREACH flagloo IN flagloop %] + [% UNLESS nogonenoaddress %]
  1. -
  2. - [% END # /FOREACH flagloo %] + [% END # /UNLESS nogonenoaddress %] + [% UNLESS nolost %] +
  3. + + [% IF CAN_user_circulate_manage_restrictions %] + + + [% ELSE %] + [% IF borrower_data.lost %]Yes[% ELSE %]No[% END %] + [% END # /IF CAN_user_circulate_manage_restrictions %] +
  4. + [% END # /UNLESS nogonenoaddress %]
--- a/members/memberentry.pl +++ a/members/memberentry.pl @@ -688,29 +688,6 @@ while (@relationships) { push(@relshipdata, \%row); } -my %flags = ( - 'gonenoaddress' => ['gonenoaddress'], - 'lost' => ['lost'] -); - -my @flagdata; -foreach ( keys(%flags) ) { - my $key = $_; - my %row = ( - 'key' => $key, - 'name' => $flags{$key}[0] - ); - if ( $data{$key} ) { - $row{'yes'} = ' checked'; - $row{'no'} = ''; - } - else { - $row{'yes'} = ''; - $row{'no'} = ' checked'; - } - push @flagdata, \%row; -} - # get Branch Loop # in modify mod: userbranch value comes from borrowers table # in add mod: userbranch value comes from branches table (ip correspondence) @@ -794,7 +771,6 @@ $template->param( borrowernumber => $borrowernumber, #register number relshiploop => \@relshipdata, btitle=> $default_borrowertitle, - flagloop => \@flagdata, modify => $modify, nok => $nok,#flag to know if an error NoUpdateLogin => $NoUpdateLogin, --