fixing bugs related to new form system

This commit is contained in:
JT Smith 2005-07-28 22:10:28 +00:00
parent 74cd198203
commit 3058d839c0
15 changed files with 68 additions and 11 deletions

View file

@ -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

View file

@ -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"
},

View file

@ -60,9 +60,6 @@ sub definition {
defaultValue=>{
defaultValue=>WebGUI::International::get(62,"WebGUI")
},
label=>{
defaultValue=>""
}
});
return $class->SUPER::definition($definition);
}

View file

@ -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)]
},

View file

@ -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"
},

View file

@ -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
},

View file

@ -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"
},

View file

@ -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
},

View file

@ -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"
},

View file

@ -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"
},

View file

@ -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"
},

View file

@ -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');

View file

@ -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 .= '</div>';
return $output;

View file

@ -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),

View file

@ -180,7 +180,7 @@ sub form {
$f->raw('</td><td width="15%">');
$f->selectList("numResults",\%results,'',[$numResults]);
$f->raw('<p/>');
$f->submit(WebGUI::International::get(170));
$f->submit(value=>WebGUI::International::get(170));
$f->raw('</td>');
$output .= $f->print;
$output .= '</tr></table>';