Remove more deprecated Form code.
This commit is contained in:
parent
01a1558cac
commit
bcc81e906c
3 changed files with 16 additions and 8 deletions
|
|
@ -344,11 +344,14 @@ sub appendSearchBoxVars {
|
|||
my $var = shift;
|
||||
my $queryText = shift;
|
||||
my $submitText = WebGUI::International->new($self->session, 'Asset_WikiMaster')->get('searchLabel');
|
||||
use WebGUI::Form::Hidden;
|
||||
use WebGUI::Form::Text;
|
||||
use WebGUI::Form::Submit;
|
||||
$var->{'searchFormHeader'} = join '',
|
||||
(WebGUI::Form::formHeader($self->session, { action => $self->getUrl, method => 'GET', }),
|
||||
WebGUI::Form::hidden($self->session, { name => 'func', value => 'search' }));
|
||||
$var->{'searchQuery'} = WebGUI::Form::text($self->session, { name => 'query', value => $queryText });
|
||||
$var->{'searchSubmit'} = WebGUI::Form::submit($self->session, { value => $submitText });
|
||||
WebGUI::Form::Hidden->new($self->session, { name => 'func', value => 'search' })->toHtml);
|
||||
$var->{'searchQuery'} = WebGUI::Form::Text($self->session, { name => 'query', value => $queryText })->toHtml;
|
||||
$var->{'searchSubmit'} = WebGUI::Form::Submit($self->session, { value => $submitText }->toHtml);
|
||||
$var->{'searchFormFooter'} = WebGUI::Form::formFooter($self->session);
|
||||
$var->{'canAddPages'} = $self->canEditPages();
|
||||
return $self;
|
||||
|
|
|
|||
|
|
@ -144,7 +144,8 @@ sub formHeader {
|
|||
my $enctype = (exists $params->{enctype} && $params->{enctype} ne "") ? $params->{enctype} : "multipart/form-data";
|
||||
|
||||
# Fix a query string in the action URL
|
||||
my $hidden = csrfToken($session);
|
||||
use WebGUI::Form::CsrfToken;
|
||||
my $hidden = WebGUI::Form::CsrfToken->new($session)->toHtml;
|
||||
if ($action =~ /\?/) {
|
||||
($action, my $query) = split /\?/, $action, 2;
|
||||
my @params = split /[&;]/, $query;
|
||||
|
|
|
|||
|
|
@ -219,12 +219,16 @@ sub getFormattedComments {
|
|||
$out .= q{<b>}.$comment->{alias}.q{:</b> "}.WebGUI::HTML::format($comment->{comment},'text').q{"</div>};
|
||||
}
|
||||
if ($self->canComment) {
|
||||
use WebGUI::Form::Hidden;
|
||||
use WebGUI::Form::Textarea;
|
||||
use WebGUI::Form::CommentRating;
|
||||
use WebGUI::Form::Submit;
|
||||
$out .= '<div class="assetAspectCommentForm">';
|
||||
$out .= WebGUI::Form::formHeader($session, {action=>$self->getUrl});
|
||||
$out .= WebGUI::Form::hidden($session, {name=>"func",value=>"addComment"});
|
||||
$out .= WebGUI::Form::textarea($session, {name=>"comment"});
|
||||
$out .= WebGUI::Form::commentRating($session, {name=>"rating"});
|
||||
$out .= WebGUI::Form::submit($session);
|
||||
$out .= WebGUI::Form::Hidden->new($session, {name=>"func",value=>"addComment"})->toHtml;
|
||||
$out .= WebGUI::Form::Textarea->new($session, {name=>"comment"})->toHtml;
|
||||
$out .= WebGUI::Form::CommentRating->new($session, {name=>"rating"})->toHtml;
|
||||
$out .= WebGUI::Form::Submit->new($session)->toHtml;
|
||||
$out .= WebGUI::Form::formFooter($session);
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue