}
}
+my $mandatory = GetMandatoryFields($action);
+my $hidden = GetHiddenFields($mandatory);
+
$template->param(
action => $action,
- hidden => GetHiddenFields(),
- mandatory => GetMandatoryFields($action),
+ hidden => $hidden,
+ mandatory => $mandatory,
member_titles => GetTitles() || undef,
branches => GetBranchesLoop(),
OPACPatronDetails => C4::Context->preference('OPACPatronDetails'),
output_html_with_http_headers $cgi, $cookie, $template->output;
sub GetHiddenFields {
+ my ($mandatory) = @_;
my %hidden_fields;
my $BorrowerUnwantedField =
my @fields = split( /\|/, $BorrowerUnwantedField );
foreach (@fields) {
next unless m/\w/o;
+ #Don't hide mandatory fields
+ next if $mandatory->{$_};
$hidden_fields{$_} = 1;
}