[Jifty-commit] r5247 - in jifty/trunk: lib/Jifty/Web/Form

Jifty commits jifty-commit at lists.jifty.org
Mon Mar 31 17:23:38 EDT 2008


Author: alexmv
Date: Mon Mar 31 17:23:38 2008
New Revision: 5247

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Web/Form/Field.pm

Log:
 r28928 at kohr-ah:  chmrr | 2008-03-31 17:19:39 -0400
  * Don't output an empty label element


Modified: jifty/trunk/lib/Jifty/Web/Form/Field.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Field.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Form/Field.pm	Mon Mar 31 17:23:38 2008
@@ -478,6 +478,7 @@
 
 sub render_label {
     my $self = shift;
+    return '' unless defined $self->label and length $self->label;
     if ( $self->render_mode eq 'update' ) {
         Jifty->web->out(
 qq!<label class="label @{[$self->classes]}" for="@{[$self->element_id ]}">@{[_($self->label) ]}</label>\n!


More information about the Jifty-commit mailing list