[Mpuls-commits] r2501 - wasko/branches/2.0/mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Apr 23 10:24:42 CEST 2010
Author: torsten
Date: 2010-04-23 10:24:36 +0200 (Fri, 23 Apr 2010)
New Revision: 2501
Modified:
wasko/branches/2.0/mpulsweb/lib/renderer.py
Log:
* mpulsweb/lib/renderer.py (ViewRenderer._renderDate.uformat_date):
New return "unbekannt" str if date is "01.01.1"
* mpulsweb/lib/renderer.py (ViewRenderer._renderDate): Fixed rendering
of "unbekannt" dates in formular.
Modified: wasko/branches/2.0/mpulsweb/lib/renderer.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/renderer.py 2010-04-22 14:45:36 UTC (rev 2500)
+++ wasko/branches/2.0/mpulsweb/lib/renderer.py 2010-04-23 08:24:36 UTC (rev 2501)
@@ -566,7 +566,14 @@
out.append(self._renderErrors(node))
self.toTarget(Item("".join(out)), meta.getTarget())
+
def _renderDate(self, node):
+
+ def uformat_date(value):
+ if value == "01.01.1":
+ return "unbekannt"
+ return value
+
meta = self._getMeta(node)
out = []
id = node.getIdentifier()
@@ -575,8 +582,9 @@
out.append(self._renderLabel(node))
out.append(self._renderAttributes(node))
out.append('<br>')
+ value = node.getValue()
out.append(tag("input", name=id, id=id,
- value=format_date(node.getValue()),
+ value=uformat_date(format_date(value)),
type="text", size=size, maxlength=maxlength,
disabled=self.ro_mode, class_="datefield"))
out.append('<br>')
More information about the Mpuls-commits
mailing list