Accept time zones with spaces or underscores to help users.

This commit is contained in:
Colin Kuskie 2009-11-16 18:35:01 -08:00
parent 110a236fcd
commit 5bf3e44ad6
3 changed files with 60 additions and 0 deletions

View file

@ -95,6 +95,26 @@ sub isDynamicCompatible {
#-------------------------------------------------------------------
=head2 new ( )
Extend the base method to handle spaces in the value and/or default value.
=cut
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
my $value = $self->get('value');
$value =~ tr/ /_/;
$self->set('value', $value);
my $defaultValue = $self->get('defaultValue');
$defaultValue =~ tr/ /_/;
$self->set('defaultValue', $defaultValue);
return $self;
}
#-------------------------------------------------------------------
=head2 toHtml ( )
Renders a database connection picker control.