--- loncom/interface/lonsearchcat.pm 2004/05/04 15:20:17 1.221 +++ loncom/interface/lonsearchcat.pm 2004/05/05 17:29:06 1.223 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.221 2004/05/04 15:20:17 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.223 2004/05/05 17:29:06 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -231,24 +231,19 @@ END $hidden_fields = ''."\n"; if (exists($ENV{'form.catalogmode'})) { - $hidden_fields .= ''."\n"; + $hidden_fields .= &hidden_field('catalogmode'); } if (exists($ENV{'form.form'})) { - $hidden_fields .= ''."\n"; + $hidden_fields .= &hidden_field('form'); } if (exists($ENV{'form.element'})) { - $hidden_fields .= ''."\n"; + $hidden_fields .= &hidden_field('element'); } if (exists($ENV{'form.titleelement'})) { - $hidden_fields .= ''."\n"; + $hidden_fields .= &hidden_field('titleelement'); } if (exists($ENV{'form.mode'})) { - $hidden_fields .= ''."\n"; + $hidden_fields .= &hidden_field('mode'); } ## ## Configure dynamic components of interface @@ -422,6 +417,14 @@ sub clean_up_environment { } } +sub hidden_field { + my ($name,$value) = @_; + if (! defined($value)) { + $value = $ENV{'form.'.$name}; + } + return ''.$/; +} + ###################################################################### ###################################################################### ## @@ -616,7 +619,8 @@ sub print_basic_search_form { ''. ''. - (' 'x2).$closebutton.(' 'x2).&viewoptions(). + (' 'x2).$closebutton.(' 'x2). + &viewoptions(). ''. ''.$/; $scrout .= ''.$/.''.''; @@ -790,10 +794,13 @@ ENDHEADER $scrout .= '
'. + &prev_next_buttons($min,$ENV{'form.show'},$total_results). + ' | '. + &viewoptions().' |