a few changes to the form control system before i continue making controls
This commit is contained in:
parent
7d95169b38
commit
6ebf9c9ff3
20 changed files with 331 additions and 1199 deletions
|
|
@ -165,6 +165,19 @@ sub definition {
|
|||
return $definition;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getName ( )
|
||||
|
||||
Returns a human readable name for this form control type. You MUST override this method with your own when creating new form controls.
|
||||
|
||||
=cut
|
||||
|
||||
sub getName {
|
||||
return "Form control not properly created."
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 fixMacros ( string )
|
||||
|
|
@ -297,7 +310,6 @@ sub new {
|
|||
unless (exists $params{value}) {
|
||||
$params{value} = $params{defaultValue};
|
||||
}
|
||||
WebGUI::ErrorHandler::debug($class);
|
||||
bless \%params, $class;
|
||||
}
|
||||
|
||||
|
|
@ -362,7 +374,10 @@ sub toHtmlWithWrapper {
|
|||
$hoverHelp = qq| onmouseover="return escape('$hoverHelp')"| if ($hoverHelp);
|
||||
my $subtext = $self->{subtext};
|
||||
$subtext = qq| <span class="formSubtext">$subtext</span>| if ($subtext);
|
||||
return '<tr'.$rowClass.'><td'.$labelClass.$hoverHelp.' valign="top" style="width: 25%;">'.$self->{label}.'</td><td valign="top"'.$fieldClass.' style="width: 75%;">'.$self->toHtml.$subtext."</td></tr>\n";
|
||||
return '<tr'.$rowClass.'>
|
||||
<td'.$labelClass.$hoverHelp.' valign="top" style="width: 25%;">'.$self->{label}.'</td>
|
||||
<td valign="top"'.$fieldClass.' style="width: 75%;">'.$self->toHtml().$subtext."</td>
|
||||
</tr>\n";
|
||||
} else {
|
||||
return $self->toHtmlAsHidden;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue