Only process macros once per page.

This commit is contained in:
JT Smith 2003-03-02 21:15:56 +00:00
parent 0ebac2be41
commit 5f6313579f
12 changed files with 219 additions and 26 deletions

View file

@ -443,6 +443,52 @@ sub file {
return '<input type="file" name="'.$_[0]->{name}.'" size="'.$size.'" '.$_[0]->{extras}.'>';
}
#-------------------------------------------------------------------
=head2 filterContent ( hashRef )
Returns a select list containing the content filter options. This is for use with WebGUI::HTML::filter().
=over
=item name
The name field for this form element. This defaults to "filterContent".
=item value
The default value for this form element.
=item extras
If you want to add anything special to this form element like javascript actions, or stylesheet information, you'd add it in here as follows:
'onChange="this.form.submit()"'
=back
=cut
sub filterContent {
my %filter;
tie %filter, 'Tie::IxHash';
%filter = (
'none'=>WebGUI::International::get(420),
'macros'=>WebGUI::International::get(891),
'javascript'=>WebGUI::International::get(526),
'most'=>WebGUI::International::get(421),
'all'=>WebGUI::International::get(419)
);
my $name = $_[0]->{name} || "filterContent";
return selectList({
name=>$name,
options=>\%filter,
value=>[$_[0]->{value}],
extras=>$_[0]->{extras}
});
}
#-------------------------------------------------------------------
=head2 formHeader ( hashRef )