Being able to set the enctype of a form is a good thing, usually for
file upload. It just occurred to me that it would be really cool if
there was a FileUpload widget that caused the form to automatically
set the enctype properly.

Thoughts?

Kevin

---------- Forwarded message ----------
From: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Dec 17, 2005 5:52 AM
Subject: [turbogears-commits] [335] trunk/turbogears/widgets/forms.py:
Added "enctype" insert option to TableForm
To: [EMAIL PROTECTED]



 Revision 335 Author danjac40 Date 2005-12-17 10:51:51 +0000 (Sat, 17 Dec 2005)
Log Message Added "enctype" insert option to TableForm

Modified Paths

trunk/turbogears/widgets/forms.py

Diff
Modified: trunk/turbogears/widgets/forms.py (334 => 335) ---
trunk/turbogears/widgets/forms.py 2005-12-17 00:52:28 UTC (rev 334)
+++ trunk/turbogears/widgets/forms.py 2005-12-17 10:51:51 UTC (rev 335)
@@ -16,7 +16,8 @@
 class TableForm(Form):
 template = """
 <form xmlns:py="http://purl.org/kid/ns#"; name="${widget.name}"
- action="${getattr(self, 'action', None)}" method="${getattr(self,
'method', 'post')}">
+ action="${getattr(self, 'action', None)}" method="${getattr(self,
'method', 'post')}"
+ enctype="${getattr(self, 'enctype', None)}">
 <div py:for="widget in widgets" py:if="widget.hidden" py:strip="True">
 ${widget.insert(getattr(self.widget_value, widget.name, None),
input_values, widget_error.get(widget.name, None))}
 </div>




--
Kevin Dangoor
Author of the Zesty News RSS newsreader

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

Reply via email to