![](https://secure.gravatar.com/avatar/a82a913ec2f6cf578731da60b0802d26.jpg?s=120&d=mm&r=g)
This is insignificant, but helpful. Removes the description <div> element when there is no description. Makes things look a little more concise. Index: nevow/freeform.py =================================================================== RCS file: /cvs/Quotient/nevow/freeform.py,v retrieving revision 1.108 diff -u -r1.108 freeform.py --- nevow/freeform.py 11 Feb 2004 01:33:09 -0000 1.108 +++ nevow/freeform.py 12 Feb 2004 17:31:20 -0000 @@ -221,12 +221,14 @@ if data.typedValue.getAttribute('compact'): return theslotfilled - return [ + ayb = [ label(_class="freeform-label")[ data.label ], theslotfilled, # freeform-input span(_class="freeform-error")[ errormessage ], - div(_class="freeform-description")[ data.description ], ] + if data.description: + ayb[div(_class="freeform-description")[ data.description ]] + return ayb def input(self, context, slot, data, name, value): raise NotImplementedError, "Implement in subclass" -- Alex Levy WWW: http://mesozoic.geecs.org "Never let your sense of morals prevent you from doing what is right." -- Salvor Hardin, Isaac Asimov's _Foundation_
![](https://secure.gravatar.com/avatar/a82a913ec2f6cf578731da60b0802d26.jpg?s=120&d=mm&r=g)
On Thu, 2004-02-12 at 12:35, Alex Levy wrote:
This is insignificant, but helpful. Removes the description <div> element when there is no description. Makes things look a little more concise.
Sorry, I jumped the gun - this patch makes a mess of other parts of freeform's output. I'm making a few other changes to improve how freeform renders its forms (mainly because I want to give CSS greater control over display). When I finish, I'll post again. -- Alex Levy WWW: http://mesozoic.geecs.org "Never let your sense of morals prevent you from doing what is right." -- Salvor Hardin, Isaac Asimov's _Foundation_
participants (1)
-
Alex Levy