[Mpuls-commits] r293 - in wasko/trunk: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 24 12:31:15 CET 2009


Author: teichmann
Date: 2009-02-24 12:31:12 +0100 (Tue, 24 Feb 2009)
New Revision: 293

Modified:
   wasko/trunk/ChangeLog.txt
   wasko/trunk/waskaweb/lib/renderer.py
Log:
Render radio matrices correctly in read only mode.


Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt	2009-02-24 10:54:57 UTC (rev 292)
+++ wasko/trunk/ChangeLog.txt	2009-02-24 11:31:12 UTC (rev 293)
@@ -1,3 +1,9 @@
+2009-02-23	Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/lib/renderer.py: In read only mode render radio bools in 
+	  radio matrices with disabled flag. Do not give them id to cure 
+	  the generated HTML.
+
 2009-02-24	Torsten Irlaender  <torsten.irlaender at intevation.de> 
 
 	New Styles for radio-matrix

Modified: wasko/trunk/waskaweb/lib/renderer.py
===================================================================
--- wasko/trunk/waskaweb/lib/renderer.py	2009-02-24 10:54:57 UTC (rev 292)
+++ wasko/trunk/waskaweb/lib/renderer.py	2009-02-24 11:31:12 UTC (rev 293)
@@ -563,11 +563,16 @@
         elif  name: oname = u'name="%s"' % escape(name, True)
         else:       oname = u''
 
-        if name: id = u'id="%s"' % escape(name, True)
-        else:    id = ""
+        #if name: id = u'id="%s"' % escape(name, True)
+        #else:    id = ""
         
+        #out = u'<input type="radio" %s %s %s %s %s %s>\n' % (
+        #    oname, id, value, required, checked, SET_MODIFICATION)
+
+        disabled = self.ro_mode and 'disabled' or ''
+
         out = u'<input type="radio" %s %s %s %s %s %s>\n' % (
-            oname, id, value, required, checked, SET_MODIFICATION)
+            oname, value, required, checked, SET_MODIFICATION, disabled)
 
         return out
 



More information about the Mpuls-commits mailing list