Convert Integer to headTags. Convert toHtml part of HTMLArea to headTags.

This commit is contained in:
Colin Kuskie 2010-09-14 13:18:03 -07:00
parent 61e2f4eb2e
commit 2b3fc264ae
2 changed files with 26 additions and 2 deletions

View file

@ -126,6 +126,19 @@ sub getValue {
#-------------------------------------------------------------------
=head2 headTags ( )
Set 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.
@ -146,7 +159,6 @@ Renders an integer field.
sub toHtml {
my $self = shift;
$self->session->style->setScript($self->session->url->extras('inputCheck.js'));
$self->set("extras", $self->get('extras') . ' onkeyup="doInputCheck(document.getElementById(\''.$self->get("id").'\'),\'0123456789-\')"');
return $self->SUPER::toHtml;
}