fix EMSSubmissionForm and all its tests
This commit is contained in:
parent
0c23ba8cd7
commit
b0da37ec15
8 changed files with 81 additions and 64 deletions
|
|
@ -67,7 +67,7 @@ sub addField {
|
|||
|
||||
push @{$self->fields}, $field;
|
||||
$self->addObject( $field );
|
||||
$self->{_fieldsByName}{ $field->get('name') } = $field; # TODO: Must allow multiple fields per name
|
||||
$self->{_fieldsByName}{ $field->get('name') || '' } = $field; # TODO: Must allow multiple fields per name
|
||||
return $field;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ sub toTemplateVars {
|
|||
}
|
||||
# Form field objects
|
||||
when ( $_->isa( 'WebGUI::Form::Control' ) ) {
|
||||
my $name = $obj->get('name');
|
||||
my $name = $obj->get('name') || '';
|
||||
$props = $obj->toTemplateVars;
|
||||
# Add the whole field to the vars
|
||||
$props->{ field } = $obj->toHtmlWithWrapper;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue