diff --git a/LICENSE.txt b/LICENSE
similarity index 100%
rename from LICENSE.txt
rename to LICENSE
diff --git a/conf/zms3.formulator.metaobj.xml b/conf/zms3.formulator.metaobj.xml
index f248fa3..923813d 100644
--- a/conf/zms3.formulator.metaobj.xml
+++ b/conf/zms3.formulator.metaobj.xml
@@ -276,11 +276,17 @@ ZMSFormulator.options.required_by_default = true;]]>
-
+ -
+
+
+
+
+
- 0
- 0
- 1
-
+
-
@@ -496,7 +502,7 @@ $ZMI.registerReady(function() {
-
+
@@ -920,25 +926,40 @@ b.input.value=a,b.refreshValue(),b.is_dirty=!0,b.onChange(!0)})}b.theme.afterInp
def getJSONEditor(self):
f = ZMSFormulator.ZMSFormulator(self)
+ objs = filter(lambda ob: ob.isActive(self.REQUEST), f.this.getObjChildren('formulatorItems', self.REQUEST, ['ZMSTextarea']))
+ if len(objs)==1:
+ beforeZMSTextarea = objs[0].getBodyContent(self.REQUEST)
+ afterZMSTextarea = ''
+ elif len(objs)>=2:
+ beforeZMSTextarea = objs[0].getBodyContent(self.REQUEST)
+ afterZMSTextarea = objs[1].getBodyContent(self.REQUEST)
+ else:
+ beforeZMSTextarea = ''
+ afterZMSTextarea = ''
+
# Google.API.sitekey.password not configured
if f.GoogleAPIKey == 'no_site_key':
output = '''
+ %s
- '''
+
%s
+ '''%(beforeZMSTextarea, afterZMSTextarea)
else:
output = '''
-
-
-
-
-
-
-
- '''%f.GoogleAPIKey
+ %s
+
+
+
+
+
+
+
+
%s
+ '''%(beforeZMSTextarea, f.GoogleAPIKey, afterZMSTextarea)
self.REQUEST.RESPONSE.setHeader('Cache-Control', 'no-cache')
self.REQUEST.RESPONSE.setHeader('Pragma', 'no-cache')
@@ -1085,7 +1106,7 @@ def downloadData(self):
-
+
diff --git a/zms3/formulator/ZMSFormulator.py b/zms3/formulator/ZMSFormulator.py
index b4c786a..fb80abf 100644
--- a/zms3/formulator/ZMSFormulator.py
+++ b/zms3/formulator/ZMSFormulator.py
@@ -50,7 +50,7 @@ def __init__(self, this):
self.getData()
# init items
- objs = filter(lambda ob: ob.isActive(self.this.REQUEST), self.this.getObjChildren('formulatorItems', self.this.REQUEST))
+ objs = filter(lambda ob: ob.isActive(self.this.REQUEST), self.this.getObjChildren('formulatorItems', self.this.REQUEST, ['ZMSFormulatorItem']))
for item in objs:
self.items.append(ZMSFormulatorItem(item))