Coverage for khufu/forms/horizontalFormControlLabel.py : 78%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# encoding: utf-8
2from . import *
4def horizontalFormControlLabel(
5 labelText="",
6 forId=False,
7 sideLabel=False,
8 location="left"):
9 """
10 *set a horizontal form label*
12 **Key Arguments**
14 - ``labelText`` -- the label text
15 - ``forId`` -- what is the label for (id of the associated object)?
18 **Return**
20 - ``horizontalFormRowLabel`` -- the horizontalFormRowLabel
22 """
23 if forId is False:
24 forId = ""
26 if sideLabel:
27 sideLabel = "sideLabel"
28 else:
29 sideLabel = ""
31 horizontalFormRowLabel = """<label class="control-label %(sideLabel)s %(location)s" for="%(forId)s">%(labelText)s</label>""" % locals(
32 )
34 return horizontalFormRowLabel