bugfix, missing labels
This commit is contained in:
parent
7dc63c1aa0
commit
ea8415f902
7 changed files with 41 additions and 11 deletions
|
|
@ -88,7 +88,7 @@ sub definition {
|
|||
|
||||
=head2 toHtml ( )
|
||||
|
||||
Renders a database connection picker control.
|
||||
Renders a template picker control.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -103,6 +103,7 @@ sub toHtml {
|
|||
}
|
||||
}
|
||||
$self->{options} = $templateList;
|
||||
$self->setManageIcons();
|
||||
return $self->SUPER::toHtml();
|
||||
}
|
||||
|
||||
|
|
@ -115,6 +116,21 @@ Renders the form field to HTML as a table row complete with labels, subtext, hov
|
|||
=cut
|
||||
|
||||
sub toHtmlWithWrapper {
|
||||
my $self = shift;
|
||||
$self->setManageIcons();
|
||||
return $self->SUPER::toHtmlWithWrapper;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setManageIcons ( )
|
||||
|
||||
Adds code to the extras field of the form so that buttons for managing or
|
||||
editing the template show up if the user is allowed to do that.
|
||||
|
||||
=cut
|
||||
|
||||
sub setManageIcons {
|
||||
my $self = shift;
|
||||
my $template = WebGUI::Asset::Template->new($self->{value});
|
||||
if (defined $template && $template->canEdit) {
|
||||
|
|
@ -126,9 +142,6 @@ sub toHtmlWithWrapper {
|
|||
$buttons .= manageIcon("func=manageAssets",$template->getParent->get("url"));
|
||||
$self->{subtext} = $buttons . $self->{subtext};
|
||||
}
|
||||
return $self->SUPER::toHtmlWithWrapper;
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue