Hide keyboard shortcuts

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 builtins import range 

3from . import * 

4 

5def horizontalFormControlGroup( 

6 content="", 

7 validationLevel=False, 

8 hidden=False): 

9 """ 

10 *Generate a horizontal form control group (row) - TBS style* 

11 

12 **Key Arguments** 

13 

14 - ``content`` -- the content 

15 - ``validationLevel`` -- validation level [ warning | error | info | success ] 

16 - ``hidden`` -- hide the CG from the user? 

17  

18 

19 **Return** 

20 

21 - ``horizontalFormControlGroup`` -- the horizontal form control group 

22  

23 """ 

24 falseList = [validationLevel, ] 

25 

26 for i in range(len(falseList)): 

27 if not falseList[i]: 

28 falseList[i] = "" 

29 

30 [validationLevel, ] = falseList 

31 

32 if hidden: 

33 hidden = """hidden""" 

34 else: 

35 hidden = "" 

36 

37 horizontalFormControlGroup = """ 

38 <div class="control-group %(validationLevel)s %(hidden)s"> 

39 %(content)s 

40 </div>""" % locals() 

41 

42 return horizontalFormControlGroup