SVN: Zope/trunk/src/OFS/dtml/properties.dtml - Fixed editing offset-naive 'date' properties in the ZMI.
Yvo Schubbe <[email protected]>
| Newsgroups | gmane.comp.web.zope.cvs |
|---|---|
| Message-ID | <20110310110937.8AC7E941C4__4661.08383047885$1299755389$gmane$org@cvs.zope.org> |
Log message for revision 120841:
- Fixed editing offset-naive 'date' properties in the ZMI.
Changed:
U Zope/trunk/src/OFS/dtml/properties.dtml
-=-
Modified: Zope/trunk/src/OFS/dtml/properties.dtml
===================================================================
--- Zope/trunk/src/OFS/dtml/properties.dtml 2011-03-10 11:09:15 UTC (rev 120840)
+++ Zope/trunk/src/OFS/dtml/properties.dtml 2011-03-10 11:09:36 UTC (rev 120841)
@@ -86,10 +86,11 @@
<input type="text" name="&dtml-id;:&dtml-type;" size="35"
value="<dtml-if "hasProperty(id)"><dtml-var
"('%s' % getProperty(id))" html_quote></dtml-if>" />
- <dtml-elif "type in ('float', 'date')">
+ <dtml-elif "type == 'date' and not _.same_type(getProperty(id), '')
+ and getProperty(id).timezoneNaive()">
<input type="text" name="&dtml-id;:&dtml-charset_tag;&dtml-type;" size="35"
- value="<dtml-var "getProperty(id)" html_quote>" />
- <dtml-elif "type in ['string','ustring']">
+ value="<dtml-var "str(getProperty(id)).rsplit(' ', 1)[0]" html_quote>" />
+ <dtml-elif "type in ['date', 'float', 'string', 'ustring']">
<input type="text" name="&dtml-id;:&dtml-charset_tag;&dtml-type;" size="35"
value="<dtml-var "getProperty(id)" html_quote>" />
<dtml-elif "type=='boolean'">
_______________________________________________
Zope-Checkins maillist - [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins