From 392d992f8295f96632179e01e790465cc9c8d3ec Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 1 Oct 2010 02:02:58 +0000 Subject: Fixed #7048 -- Added ClearableFileInput widget to clear file fields. Thanks for report and patch, jarrow and Carl Meyer. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13968 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/forms/fields.txt | 4 ++-- docs/ref/forms/widgets.txt | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'docs/ref/forms') diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 0dd9095a77..d2b1c303ed 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -507,7 +507,7 @@ given length. .. class:: FileField(**kwargs) - * Default widget: ``FileInput`` + * Default widget: ``ClearableFileInput`` * Empty value: ``None`` * Normalizes to: An ``UploadedFile`` object that wraps the file content and file name into a single object. @@ -573,7 +573,7 @@ These control the range of values permitted in the field. .. class:: ImageField(**kwargs) - * Default widget: ``FileInput`` + * Default widget: ``ClearableFileInput`` * Empty value: ``None`` * Normalizes to: An ``UploadedFile`` object that wraps the file content and file name into a single object. diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 05215d4d8e..c01a7368bd 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -46,6 +46,14 @@ commonly used groups of widgets: File upload input: ```` +.. class:: ClearableFileInput + + .. versionadded:: 1.3 + + File upload input: ````, with an additional checkbox + input to clear the field's value, if the field is not required and has + initial data. + .. class:: DateInput .. versionadded:: 1.1 -- cgit v1.3