Override new in Form plugins that set their options, so the options are always available. Fixes bug #12190.

This commit is contained in:
Colin Kuskie 2011-07-11 13:04:22 -07:00
parent 1c08796d6c
commit 4b663fdf0b
14 changed files with 124 additions and 185 deletions

View file

@ -141,14 +141,15 @@ sub isDynamicCompatible {
#-------------------------------------------------------------------
=head2 toHtml ( )
=head2 new ( )
Renders a template picker control.
Extend the base "new" to set options.
=cut
sub toHtml {
my $self = shift;
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
my $workflowList = WebGUI::Workflow->getList($self->session, $self->get("type"));
if ( $self->get("none") ) {
@ -157,7 +158,7 @@ sub toHtml {
}
$self->set("options", $workflowList);
return $self->SUPER::toHtml();
return $self;
}
#-------------------------------------------------------------------