Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 4927:c120f747e0b4
In case of an error, date fields would lose the calendar help, fixed.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Sat, 06 Sep 2014 21:21:05 +0200 |
| parents | ca692423e401 |
| children | 5a59c723e57f |
comparison
equal
deleted
inserted
replaced
| 4922:6651923ea3ac | 4927:c120f747e0b4 |
|---|---|
| 1769 'DateHTMLProperty must be either DateHTMLProperty ' | 1769 'DateHTMLProperty must be either DateHTMLProperty ' |
| 1770 'or string date representation.') | 1770 'or string date representation.') |
| 1771 elif isinstance(value, str) or isinstance(value, unicode): | 1771 elif isinstance(value, str) or isinstance(value, unicode): |
| 1772 # most likely erroneous input to be passed back to user | 1772 # most likely erroneous input to be passed back to user |
| 1773 if isinstance(value, unicode): value = value.encode('utf8') | 1773 if isinstance(value, unicode): value = value.encode('utf8') |
| 1774 return self.input(name=self._formname, value=value, size=size, | 1774 print "string encountered" |
| 1775 s = self.input(name=self._formname, value=value, size=size, | |
| 1775 **kwargs) | 1776 **kwargs) |
| 1777 if popcal: | |
| 1778 s += self.popcal() | |
| 1779 return s | |
| 1776 else: | 1780 else: |
| 1777 raw_value = value | 1781 raw_value = value |
| 1778 | 1782 |
| 1779 if raw_value is None: | 1783 if raw_value is None: |
| 1780 value = '' | 1784 value = '' |
