Convert Codearea, Slider and Zipcode to headTags

This commit is contained in:
Colin Kuskie 2010-09-14 14:00:29 -07:00
parent 2c92273fae
commit e02844d00c
3 changed files with 57 additions and 19 deletions

View file

@ -103,6 +103,19 @@ sub getValue {
#-------------------------------------------------------------------
=head2 headTags ( )
Set the head tags for this form plugin
=cut
sub headTags {
my $self = shift;
$self->session->style->setScript($self->session->url->extras('inputCheck.js'),{ type=>'text/javascript' });
}
#-------------------------------------------------------------------
=head2 isDynamicCompatible ( )
A class method that returns a boolean indicating whether this control is compatible with the DynamicField control.
@ -123,7 +136,6 @@ Renders a zip code field.
sub toHtml {
my $self = shift;
$self->session->style->setScript($self->session->url->extras('inputCheck.js'),{ type=>'text/javascript' });
$self->set("extras", $self->get('extras') . ' onkeyup="doInputCheck(document.getElementById(\''.$self->get("id").'\'),\'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz- \')"');
return $self->SUPER::toHtml;
}