From 550912c513fa7b995c50c3f616d73e3df91eacfe Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Fri, 6 Aug 2010 17:47:58 +0000 Subject: Fixed #8426 - added 'helptext' CSS class to help text in forms to aid in styling Thanks to erikcw for report, mrts and rpbarlow for patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@13519 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/forms.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tests/regressiontests/forms/forms.py') diff --git a/tests/regressiontests/forms/forms.py b/tests/regressiontests/forms/forms.py index 85eced26ad..9e45a267db 100644 --- a/tests/regressiontests/forms/forms.py +++ b/tests/regressiontests/forms/forms.py @@ -1258,20 +1258,20 @@ to a Field class. This help text is displayed when a Form is rendered. ... password = CharField(widget=PasswordInput, help_text='Choose wisely.') >>> p = UserRegistration(auto_id=False) >>> print p.as_ul() -
  • Username: e.g., user@example.com
  • -
  • Password: Choose wisely.
  • +
  • Username: e.g., user@example.com
  • +
  • Password: Choose wisely.
  • >>> print p.as_p() -

    Username: e.g., user@example.com

    -

    Password: Choose wisely.

    +

    Username: e.g., user@example.com

    +

    Password: Choose wisely.

    >>> print p.as_table() -Username:
    e.g., user@example.com -Password:
    Choose wisely. +Username:
    e.g., user@example.com +Password:
    Choose wisely. The help text is displayed whether or not data is provided for the form. >>> p = UserRegistration({'username': u'foo'}, auto_id=False) >>> print p.as_ul() -
  • Username: e.g., user@example.com
  • -
  • Password: Choose wisely.
  • +
  • Username: e.g., user@example.com
  • +
  • Password: Choose wisely.
  • help_text is not displayed for hidden fields. It can be used for documentation purposes, though. @@ -1281,7 +1281,7 @@ purposes, though. ... next = CharField(widget=HiddenInput, initial='/', help_text='Redirect destination') >>> p = UserRegistration(auto_id=False) >>> print p.as_ul() -
  • Username: e.g., user@example.com
  • +
  • Username: e.g., user@example.com
  • Password:
  • Help text can include arbitrary Unicode characters. @@ -1289,7 +1289,7 @@ Help text can include arbitrary Unicode characters. ... username = CharField(max_length=10, help_text='ŠĐĆŽćžšđ') >>> p = UserRegistration(auto_id=False) >>> p.as_ul() -u'
  • Username: \u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111
  • ' +u'
  • Username: \u0160\u0110\u0106\u017d\u0107\u017e\u0161\u0111
  • ' # Subclassing forms ########################################################### -- cgit v1.3