Override new in Form plugins that set their options, so the options are always available. Fixes bug #12190.
This commit is contained in:
parent
1c08796d6c
commit
4b663fdf0b
14 changed files with 124 additions and 185 deletions
|
|
@ -245,20 +245,20 @@ sub isDynamicCompatible {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 toHtml ( )
|
||||
=head2 new ( )
|
||||
|
||||
Renders a country 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 %countries;
|
||||
tie %countries, 'Tie::IxHash';
|
||||
%countries = map {$_ => $_} getCountries();
|
||||
$self->set("options", \%countries);
|
||||
return $self->SUPER::toHtml();
|
||||
$self->set('options', \%countries);
|
||||
return $self;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue