Skip to content

Commit

Permalink
ejo - conditionally render form fields within a table to support olde…
Browse files Browse the repository at this point in the history
…r version of eprints <3.4.2 (#8)
  • Loading branch information
fatchild authored Sep 13, 2024
1 parent 2f0c797 commit 16cedba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/plugins/EPrints/Plugin/Screen/Report.pm
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,10 @@ sub render_splash_page
#render possible search forms
foreach my $formid (keys %search_forms)
{
my $table = $repo->make_element( "table", class=>"ep_search_fields", id=>$formid, style=>"display: none" );
$form->appendChild( $table );
$table->appendChild( $search_forms{$formid} );
my $fields_tag = $search_forms{$formid}->findnodes('tr')->size > 0 ? "table" : "div";
my $fields_wrapper = $repo->make_element( $fields_tag, class=>"ep_search_fields", id=>$formid, style=>"display: none" );
$form->appendChild( $fields_wrapper );
$fields_wrapper->appendChild( $search_forms{$formid} )
}

$form->appendChild( $self->render_controls );
Expand Down

0 comments on commit 16cedba

Please sign in to comment.