fixing bugs related to new form system
This commit is contained in:
parent
74cd198203
commit
3058d839c0
15 changed files with 68 additions and 11 deletions
|
|
@ -87,7 +87,7 @@ Add extra attributes to the form tag like
|
||||||
|
|
||||||
=head4 label
|
=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
|
=head4 uiLevel
|
||||||
|
|
||||||
|
|
@ -138,7 +138,7 @@ sub definition {
|
||||||
defaultValue=>undef
|
defaultValue=>undef
|
||||||
},
|
},
|
||||||
label=>{
|
label=>{
|
||||||
defaultValue=>$class->getName
|
defaultValue=>undef
|
||||||
},
|
},
|
||||||
uiLevel=>{
|
uiLevel=>{
|
||||||
defaultValue=>1
|
defaultValue=>1
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
name=>{
|
name=>{
|
||||||
defaultValue=> "asset"
|
defaultValue=> "asset"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,6 @@ sub definition {
|
||||||
defaultValue=>{
|
defaultValue=>{
|
||||||
defaultValue=>WebGUI::International::get(62,"WebGUI")
|
defaultValue=>WebGUI::International::get(62,"WebGUI")
|
||||||
},
|
},
|
||||||
label=>{
|
|
||||||
defaultValue=>""
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return $class->SUPER::definition($definition);
|
return $class->SUPER::definition($definition);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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".
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
types=>{
|
types=>{
|
||||||
defaultValue=>[qw(mixed html code text)]
|
defaultValue=>[qw(mixed html code text)]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
name=>{
|
name=>{
|
||||||
defaultValue=>"databaseLinkId"
|
defaultValue=>"databaseLinkId"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
size=>{
|
size=>{
|
||||||
defaultValue=>1
|
defaultValue=>1
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
name=>{
|
name=>{
|
||||||
defaultValue=>"filterContent"
|
defaultValue=>"filterContent"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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).
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
size=>{
|
size=>{
|
||||||
defaultValue=>1
|
defaultValue=>1
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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".
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
name=>{
|
name=>{
|
||||||
defaultValue=>"ldapLinkId"
|
defaultValue=>"ldapLinkId"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
name=>{
|
name=>{
|
||||||
defaultValue=>"templateId"
|
defaultValue=>"templateId"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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.
|
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
|
=cut
|
||||||
|
|
||||||
sub definition {
|
sub definition {
|
||||||
my $class = shift;
|
my $class = shift;
|
||||||
my $definition = shift || [];
|
my $definition = shift || [];
|
||||||
push(@{$definition}, {
|
push(@{$definition}, {
|
||||||
|
label=>{
|
||||||
|
defaultValue=>$class->getName()
|
||||||
|
},
|
||||||
name=>{
|
name=>{
|
||||||
defaultValue=>"proceed"
|
defaultValue=>"proceed"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ sub www_checkoutConfirm {
|
||||||
$f = WebGUI::HTMLForm->new;
|
$f = WebGUI::HTMLForm->new;
|
||||||
$f->hidden('op', 'checkoutSubmit');
|
$f->hidden('op', 'checkoutSubmit');
|
||||||
$f->raw($plugin->checkoutForm);
|
$f->raw($plugin->checkoutForm);
|
||||||
$f->submit($i18n->get('pay button'));
|
$f->submit(value=>$i18n->get('pay button'));
|
||||||
|
|
||||||
$var{form} = $f->print;
|
$var{form} = $f->print;
|
||||||
$var{title} = $i18n->get('checkout confirm title');
|
$var{title} = $i18n->get('checkout confirm title');
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ sub getGroupSearchForm {
|
||||||
-value=>$session{scratch}{groupSearchKeyword},
|
-value=>$session{scratch}{groupSearchKeyword},
|
||||||
-size=>15
|
-size=>15
|
||||||
);
|
);
|
||||||
$f->submit(WebGUI::International::get(170));
|
$f->submit(value=>WebGUI::International::get(170));
|
||||||
$output .= $f->print;
|
$output .= $f->print;
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
return $output;
|
return $output;
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,6 @@ sub getUserSearchForm {
|
||||||
$f->selectList(
|
$f->selectList(
|
||||||
-name=>"modifier",
|
-name=>"modifier",
|
||||||
-value=>([$session{scratch}{userSearchModifier} || "contains"]),
|
-value=>([$session{scratch}{userSearchModifier} || "contains"]),
|
||||||
-label=>"",
|
|
||||||
-options=>{
|
-options=>{
|
||||||
startsWith=>WebGUI::International::get("starts with"),
|
startsWith=>WebGUI::International::get("starts with"),
|
||||||
contains=>WebGUI::International::get("contains"),
|
contains=>WebGUI::International::get("contains"),
|
||||||
|
|
@ -130,13 +129,11 @@ sub getUserSearchForm {
|
||||||
);
|
);
|
||||||
$f->text(
|
$f->text(
|
||||||
-name=>"keyword",
|
-name=>"keyword",
|
||||||
-label=>"",
|
|
||||||
-value=>$session{scratch}{userSearchKeyword},
|
-value=>$session{scratch}{userSearchKeyword},
|
||||||
-size=>15
|
-size=>15
|
||||||
);
|
);
|
||||||
$f->selectList(
|
$f->selectList(
|
||||||
-name => "status",
|
-name => "status",
|
||||||
-label=>"",
|
|
||||||
-value => [$session{scratch}{userSearchStatus} || "users.status like '%'"],
|
-value => [$session{scratch}{userSearchStatus} || "users.status like '%'"],
|
||||||
-options=> {
|
-options=> {
|
||||||
"" => WebGUI::International::get(821),
|
"" => WebGUI::International::get(821),
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ sub form {
|
||||||
$f->raw('</td><td width="15%">');
|
$f->raw('</td><td width="15%">');
|
||||||
$f->selectList("numResults",\%results,'',[$numResults]);
|
$f->selectList("numResults",\%results,'',[$numResults]);
|
||||||
$f->raw('<p/>');
|
$f->raw('<p/>');
|
||||||
$f->submit(WebGUI::International::get(170));
|
$f->submit(value=>WebGUI::International::get(170));
|
||||||
$f->raw('</td>');
|
$f->raw('</td>');
|
||||||
$output .= $f->print;
|
$output .= $f->print;
|
||||||
$output .= '</tr></table>';
|
$output .= '</tr></table>';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue