diff --git a/lib/WebGUI/Form/Control.pm b/lib/WebGUI/Form/Control.pm index 5bf701b46..3fa1ac7c7 100644 --- a/lib/WebGUI/Form/Control.pm +++ b/lib/WebGUI/Form/Control.pm @@ -87,7 +87,7 @@ Add extra attributes to the form tag like =head4 label -A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to the getName() method call. +A text label that will be displayed if toHtmlWithWrapper() is called. =head4 uiLevel @@ -138,7 +138,7 @@ sub definition { defaultValue=>undef }, label=>{ - defaultValue=>$class->getName + defaultValue=>undef }, uiLevel=>{ defaultValue=>1 diff --git a/lib/WebGUI/Form/asset.pm b/lib/WebGUI/Form/asset.pm index 1f363fa71..f5d747311 100644 --- a/lib/WebGUI/Form/asset.pm +++ b/lib/WebGUI/Form/asset.pm @@ -59,12 +59,19 @@ The name of the field. Defaults to "asset". Limits the list of selectable assets to a specific class, such as "WebGUI::Asset::Wobject::Article", specified by this parameter. +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, name=>{ defaultValue=> "asset" }, diff --git a/lib/WebGUI/Form/button.pm b/lib/WebGUI/Form/button.pm index e0f25206a..db77eddd3 100644 --- a/lib/WebGUI/Form/button.pm +++ b/lib/WebGUI/Form/button.pm @@ -60,9 +60,6 @@ sub definition { defaultValue=>{ defaultValue=>WebGUI::International::get(62,"WebGUI") }, - label=>{ - defaultValue=>"" - } }); return $class->SUPER::definition($definition); } diff --git a/lib/WebGUI/Form/contentType.pm b/lib/WebGUI/Form/contentType.pm index dc69f76d3..b3fe50816 100644 --- a/lib/WebGUI/Form/contentType.pm +++ b/lib/WebGUI/Form/contentType.pm @@ -56,12 +56,19 @@ An array reference of field types to be displayed. The types are "mixed", "html" An array reference of the items to be checked if no value is specified. Defaults to "mixed". Possible values are "mixed", "code", "html", and "text". +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, types=>{ defaultValue=>[qw(mixed html code text)] }, diff --git a/lib/WebGUI/Form/databaseLink.pm b/lib/WebGUI/Form/databaseLink.pm index 6810743df..be3674d83 100644 --- a/lib/WebGUI/Form/databaseLink.pm +++ b/lib/WebGUI/Form/databaseLink.pm @@ -68,12 +68,19 @@ A URL that will be acted upon after editing a database link. A tooltip to tell the user what to do with the field. Defaults a standard piece of help for Database Links. +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, name=>{ defaultValue=>"databaseLinkId" }, diff --git a/lib/WebGUI/Form/fieldType.pm b/lib/WebGUI/Form/fieldType.pm index e8daae126..f208ee58a 100644 --- a/lib/WebGUI/Form/fieldType.pm +++ b/lib/WebGUI/Form/fieldType.pm @@ -56,12 +56,19 @@ Defaults to 1. How many characters tall should this control be represented. An array reference containing the form control types to be selectable. Defaults to all available types. +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, size=>{ defaultValue=>1 }, diff --git a/lib/WebGUI/Form/filterContent.pm b/lib/WebGUI/Form/filterContent.pm index 0a5024d45..fc30d940f 100644 --- a/lib/WebGUI/Form/filterContent.pm +++ b/lib/WebGUI/Form/filterContent.pm @@ -57,12 +57,19 @@ The name of this field to be passed through the URI. Defaults to "filterContent" A tooltip for what to do with this field. Defaults to a general explaination of content filters. +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, name=>{ defaultValue=>"filterContent" }, diff --git a/lib/WebGUI/Form/group.pm b/lib/WebGUI/Form/group.pm index 9759d1c08..2a8c5b526 100644 --- a/lib/WebGUI/Form/group.pm +++ b/lib/WebGUI/Form/group.pm @@ -68,12 +68,19 @@ An array reference containing a list of groups to exclude from the list. Default This will be used if no value is specified. Should be passed as an array reference. Defaults to 7 (Everyone). +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, size=>{ defaultValue=>1 }, diff --git a/lib/WebGUI/Form/ldapLink.pm b/lib/WebGUI/Form/ldapLink.pm index 623ec2839..9f97bc4c3 100644 --- a/lib/WebGUI/Form/ldapLink.pm +++ b/lib/WebGUI/Form/ldapLink.pm @@ -72,12 +72,19 @@ The number of characters tall this list should be. Defaults to '1'. Boolean indicating whether the user can select multiple items from this list like a checkList. Defaults to "0". +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, name=>{ defaultValue=>"ldapLinkId" }, diff --git a/lib/WebGUI/Form/template.pm b/lib/WebGUI/Form/template.pm index f0b77841f..12a111c88 100644 --- a/lib/WebGUI/Form/template.pm +++ b/lib/WebGUI/Form/template.pm @@ -59,12 +59,19 @@ The identifier for this field. Defaults to "templateId". The namespace for the list of templates to return. If this is omitted, all templates will be displayed. +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, name=>{ defaultValue=>"templateId" }, diff --git a/lib/WebGUI/Form/whatNext.pm b/lib/WebGUI/Form/whatNext.pm index dc39150ad..6b360667a 100644 --- a/lib/WebGUI/Form/whatNext.pm +++ b/lib/WebGUI/Form/whatNext.pm @@ -64,12 +64,19 @@ A URL that will be acted upon after editing a database link. A tooltip to tell the user what to do with the field. Defaults a standard piece of help for Database Links. +=head4 label + +A text label that will be displayed if toHtmlWithWrapper() is called. Defaults to getName(). + =cut sub definition { my $class = shift; my $definition = shift || []; push(@{$definition}, { + label=>{ + defaultValue=>$class->getName() + }, name=>{ defaultValue=>"proceed" }, diff --git a/lib/WebGUI/Operation/Commerce.pm b/lib/WebGUI/Operation/Commerce.pm index 9f99c2f41..772e3f4b7 100644 --- a/lib/WebGUI/Operation/Commerce.pm +++ b/lib/WebGUI/Operation/Commerce.pm @@ -171,7 +171,7 @@ sub www_checkoutConfirm { $f = WebGUI::HTMLForm->new; $f->hidden('op', 'checkoutSubmit'); $f->raw($plugin->checkoutForm); - $f->submit($i18n->get('pay button')); + $f->submit(value=>$i18n->get('pay button')); $var{form} = $f->print; $var{title} = $i18n->get('checkout confirm title'); diff --git a/lib/WebGUI/Operation/Group.pm b/lib/WebGUI/Operation/Group.pm index e2c496987..e0e77a535 100644 --- a/lib/WebGUI/Operation/Group.pm +++ b/lib/WebGUI/Operation/Group.pm @@ -128,7 +128,7 @@ sub getGroupSearchForm { -value=>$session{scratch}{groupSearchKeyword}, -size=>15 ); - $f->submit(WebGUI::International::get(170)); + $f->submit(value=>WebGUI::International::get(170)); $output .= $f->print; $output .= ''; return $output; diff --git a/lib/WebGUI/Operation/User.pm b/lib/WebGUI/Operation/User.pm index ea9353efc..215f1b533 100644 --- a/lib/WebGUI/Operation/User.pm +++ b/lib/WebGUI/Operation/User.pm @@ -121,7 +121,6 @@ sub getUserSearchForm { $f->selectList( -name=>"modifier", -value=>([$session{scratch}{userSearchModifier} || "contains"]), - -label=>"", -options=>{ startsWith=>WebGUI::International::get("starts with"), contains=>WebGUI::International::get("contains"), @@ -130,13 +129,11 @@ sub getUserSearchForm { ); $f->text( -name=>"keyword", - -label=>"", -value=>$session{scratch}{userSearchKeyword}, -size=>15 ); $f->selectList( -name => "status", - -label=>"", -value => [$session{scratch}{userSearchStatus} || "users.status like '%'"], -options=> { "" => WebGUI::International::get(821), diff --git a/lib/WebGUI/Search.pm b/lib/WebGUI/Search.pm index ae670e21a..1cb590909 100644 --- a/lib/WebGUI/Search.pm +++ b/lib/WebGUI/Search.pm @@ -180,7 +180,7 @@ sub form { $f->raw(''); $f->selectList("numResults",\%results,'',[$numResults]); $f->raw('

'); - $f->submit(WebGUI::International::get(170)); + $f->submit(value=>WebGUI::International::get(170)); $f->raw(''); $output .= $f->print; $output .= '';