From ce73956d603a3ad6177fdaed28d201dc9ca83109 Mon Sep 17 00:00:00 2001 From: David Delikat Date: Sat, 13 Aug 2011 17:40:39 -0500 Subject: [PATCH] added 'textExtras' property for passing 'extras' to the text box portion of the combo --- lib/WebGUI/Form/Combo.pm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Form/Combo.pm b/lib/WebGUI/Form/Combo.pm index c2b41ef5b..17b6e2b91 100644 --- a/lib/WebGUI/Form/Combo.pm +++ b/lib/WebGUI/Form/Combo.pm @@ -40,7 +40,25 @@ The following methods are specifically available from this class. Check the supe =cut +#------------------------------------------------------------------- +=head2 definition ( session, [ additionalTerms ] ) + +Add another field so we can provide extras to the text area vs the selectBox + +=cut + +sub definition { + my $class = shift; + my $session = shift; + my $definition = shift || []; + push(@{$definition}, { + textExtras=>{ + defaultValue=>undef + }, + }); + return $definition; +} #------------------------------------------------------------------- @@ -127,7 +145,8 @@ sub toHtml { .WebGUI::Form::Text->new($self->session, size=>$self->session->setting->get("textBoxSize")-5, name=>$self->get("name")."_new", - id=>$self->get('id')."_new" + id=>$self->get('id')."_new", + extras=>$self->get('textExtras')||$self->get('extras'), )->toHtml; }