[Formed-commits] r373 - trunk/formed/formed/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 29 10:23:14 CEST 2010
Author: torsten
Date: 2010-07-29 10:23:13 +0200 (Thu, 29 Jul 2010)
New Revision: 373
Modified:
trunk/formed/formed/model/data.py
Log:
* formed/formed/model/data.py: Added "invisible" attribute to
BoolLeafs. This can be used to hide options in choicelists. so the
user can not select the value in the user interface. But the db will
have this option so is ist still present in the db an can be used
Modified: trunk/formed/formed/model/data.py
===================================================================
--- trunk/formed/formed/model/data.py 2010-07-26 08:39:43 UTC (rev 372)
+++ trunk/formed/formed/model/data.py 2010-07-29 08:23:13 UTC (rev 373)
@@ -147,12 +147,20 @@
def __init__(self):
Leaf.__init__(self)
self.attributes["checked"] = ""
+ self.attributes["invisible"] = ""
def getChecked(self):
return self.getAttribute("checked")
def setChecked(self, checked):
self.setSelected("checked", checked)
+
+ def isInvisible(self):
+ return self.getAttribute("invisible") and True or False
+
+ def setInvisible(self, invisible):
+ invisible = invisible and "true" or ""
+ self.setAttribute("invisible", invisible)
class ExternalChoiceListLeaf(Leaf):
def __init__(self):
More information about the Formed-commits
mailing list