From 61e2f4eb2e02e2ba7cff2b2a72d7eee3c2a37c8d Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 14 Sep 2010 13:15:28 -0700 Subject: [PATCH] Convert Hexadecimal to headTags --- lib/WebGUI/Form/Hexadecimal.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Form/Hexadecimal.pm b/lib/WebGUI/Form/Hexadecimal.pm index d43a09a3a..8e49136a4 100644 --- a/lib/WebGUI/Form/Hexadecimal.pm +++ b/lib/WebGUI/Form/Hexadecimal.pm @@ -110,6 +110,19 @@ sub getValue { #------------------------------------------------------------------- +=head2 headTags ( ) + +A class method that returns a boolean indicating whether this control is compatible with the DynamicField control. + +=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. @@ -130,7 +143,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").'\'),\'0123456789abcdef\')"'); return $self->SUPER::toHtml; }