new i18n api requiring $session

This commit is contained in:
Colin Kuskie 2006-01-12 17:49:20 +00:00
parent 877bf082a0
commit 01d95a265e
141 changed files with 2266 additions and 1745 deletions

View file

@ -56,16 +56,18 @@ Defaults to "Text". Should be any valid field type.
sub definition {
my $class = shift;
my $session = shift;
my $definition = shift || [];
my $i18n = WebGUI::International->new($session);
push(@{$definition}, {
formName=>{
defaultValue=>WebGUI::International::get("475","WebGUI"),
defaultValue=>$i18n->get("475"),
},
fieldType=>{
defaultValue=> "Text"
},
});
return $class->SUPER::definition($definition);
return $class->SUPER::definition($session, $definition);
}
#-------------------------------------------------------------------
@ -76,7 +78,21 @@ Creates the object for the appropriate field type.
=head3 params
The normal params you'd pass in to the field. Included in this list must be one element called "fieldType" which specifies what type of field to dynamically render.
The normal params you'd pass in to the field. Included in this list
must be one element called "fieldType" which specifies what type of
field to dynamically render. List-type forms, however, can take
two additional parameters:
=head4 possibleValues
This is a newline delimited set of values. A hash will be set by splitting the string
on newlines and making the key and value of each hash entry equal.
=head4 value
For List-type forms which support multiple select, this is normally an arrayref holding all pre-selected
values. However, if it is a scalar string, the string will be split on newlines and the resulting
array will be used.
=cut