all wobjects integrated into new discussion system

This commit is contained in:
JT Smith 2003-10-18 15:48:09 +00:00
parent 65a9ecbd34
commit 2302c372fb
6 changed files with 43 additions and 18 deletions

View file

@ -660,12 +660,21 @@ If you want to add anything special to the form header like javascript actions o
=cut
sub formHeader {
my ($action, $method, $enctype);
$action = $_[0]->{action} || WebGUI::URL::page();
$method = $_[0]->{method} || "POST";
$enctype = $_[0]->{enctype} || "multipart/form-data";
return '<form action="'.$action.'" enctype="'.$enctype.'" method="'.$method.'" '.$_[0]->{extras}.'>';
my $action = $_[0]->{action} || WebGUI::URL::page();
my $hidden;
if ($action =~ /\?/) {
my ($path,$query) = split(/\?/,$action);
$action = $path;
my @params = split(/\&/,$query);
foreach my $param (@params) {
$param =~ s/amp;(.*)/$1/;
my ($name,$value) = split(/\=/,$param);
$hidden .= hidden({name=>$name,value=>$value});
}
}
my $method = $_[0]->{method} || "POST";
my $enctype = $_[0]->{enctype} || "multipart/form-data";
return '<form action="'.$action.'" enctype="'.$enctype.'" method="'.$method.'" '.$_[0]->{extras}.'>'.$hidden;
}