Skip to content

Commit

Permalink
fixed opt. ssl error on http_import (req by DESY)
Browse files Browse the repository at this point in the history
  • Loading branch information
drfho committed Apr 3, 2021
1 parent 74d5b8d commit 6101571
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 26 deletions.
66 changes: 42 additions & 24 deletions ZMSFormulator/standard_html.zpt
Original file line number Diff line number Diff line change
@@ -1,29 +1,47 @@
<!-- ZMSFormulator.standard_html -->

<tal:block tal:define="global this options/zmscontext">
<style>
#editor_holder .checkbox {
line-height: normal;
}
#editor_holder h3 {
display: none;
}
#editor_holder label.control-label {
white-space: normal;
}
button {
font-family: FrutigerLTW02-45Light,Arial,Helvetica,sans-serif;
}
#editor_holder div[data-schemapath*="TEXTAREA"] label,
#editor_holder div[data-schemapath*="TEXTAREA"] input {
display:none;
}
</style>
<div tal:attributes="class python:this.REQUEST.get('tmpl','portal_or_oe')!='portal_or_oe' and 'col-lg-8 col-lg-offset-3 col-md-10 col-md-offset-1' or ''" tal:omit-tag="python:this.REQUEST.get('tmpl','portal_or_oe')=='subwebsite'">
<h1 tal:content="structure python:this.getTitle(request)" tal:condition="python:this.REQUEST.get('tmpl','portal_or_oe')!='subwebsite'">title</h1>
<p tal:condition="python:this.attr('attr_dc_description') and this.REQUEST.get('tmpl','portal_or_oe')!='subwebsite'" tal:content="python:this.attr('attr_dc_description')" class="lead">attr_dc_description</p>
<tal:block tal:content="structure python:this.getJSONEditor()"></tal:block>
</div>
<div class="ZMSFormulator"
tal:define="global this options/zmscontext">
<style>
#editor_holder .checkbox {
line-height: normal;
}
#editor_holder h3 {
display: none;
}
#editor_holder label.control-label {
white-space: normal;
}
button {
font-family: FrutigerLTW02-45Light,Arial,Helvetica,sans-serif;
}
#editor_holder div[data-schemapath*="TEXTAREA"] label,
#editor_holder div[data-schemapath*="TEXTAREA"] input {
display:none;
}
#valid_indicator {
height: 50px;
line-height: 50px;
display: inline-block;
vertical-align: top;
font-weight: bold;
}
.row.has-error label,
.row.has-error input,
.row.has-error textarea {
color:red
}
.row.has-error input,
.row.has-error textarea {
background-color:rgb(255 0 0 / 0.15);
border-color:red
}
</style>
<div tal:attributes="class python:this.REQUEST.get('tmpl','portal_or_oe')!='portal_or_oe' and 'col-lg-8 col-lg-offset-3 col-md-10 col-md-offset-1' or ''" tal:omit-tag="python:this.REQUEST.get('tmpl','portal_or_oe')=='subwebsite'">
<h1 tal:content="structure python:this.getTitle(request)" tal:condition="python:this.REQUEST.get('tmpl','portal_or_oe')!='subwebsite'">title</h1>
<p tal:condition="python:this.attr('attr_dc_description') and this.REQUEST.get('tmpl','portal_or_oe')!='subwebsite'" tal:content="python:this.attr('attr_dc_description')" class="lead">attr_dc_description</p>
<tal:block tal:content="structure python:this.getJSONEditor()"></tal:block>
</div>
</tal:block>

<!-- /ZMSFormulator.standard_html -->
5 changes: 3 additions & 2 deletions zms3.formulator.lib/JSONEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ def __init__(self, obj):
def render(self, obj):

script = '<script src="%s/metaobj_manager/zms3.formulator.lib.jsoneditor.min.js"></script>\n<script>%s</script>'
editor = standard.http_import(obj.this, obj.this.getMetaobjManager().absolute_url() + '/zms3.formulator.lib.jsoneditor.custom.js')
editor = editor % (self.getLangDict(obj), obj.thisURLPath,
# editor = standard.http_import(obj.this, obj.this.getMetaobjManager().absolute_url() + '/zms3.formulator.lib.jsoneditor.custom.js')
editor = obj.this.content.metaobj_manager.evalMetaobjAttr('zms3.formulator.lib','jsoneditor.custom.js',options={})
editor = str(editor) % (self.getLangDict(obj), obj.thisURLPath,
obj.this.REQUEST.get('lang'), obj.GoogleAPIKey,
obj.options, self.mandatory_validators, obj.onReady,
obj.thisURLPath, obj.onChange)
Expand Down

0 comments on commit 6101571

Please sign in to comment.