Subject: | HTML::FormHandler::Render::Simple : lable should not be displayed, if it's empty |
If I want create element without label (label => ""), then I see ":"
before element instead of nothing.
Subject: | Simple.pm.patch |
--- /usr/local/share/perl/5.10.0/HTML/FormHandler/Render/Simple.pm 2009-08-17 20:23:07.000000000 +0300
+++ /tmp/Simple.pm 2009-08-21 06:14:48.000000000 +0300
@@ -342,7 +342,7 @@
sub _label
{
my ( $self, $field ) = @_;
- return '<label class="label" for="' . $field->id . '">' . $field->label . ': </label>';
+ return $field->label ? '<label class="label" for="' . $field->id . '">' . $field->label . ': </label>' : '';
}
sub render_compound