Commit 708c11a1 by Александр

added input type

parent 758e76dc
......@@ -624,3 +624,20 @@ def imageinput(element, value, status, render_template, msg=''):
}
html = render_template("imageinput.html", context)
return etree.XML(html)
#-----------------------------------------------------------------------------
@register_render_function
def crystallography(element, value, status, render_template, msg=''):
eid = element.get('id')
height = element.get('height')
width = element.get('width')
display_file = element.get('display_file')
context = {
'id': eid,
'width': width,
'height': height,
'display_file': display_file,
}
html = render_template("crystallography.html", context)
return etree.XML(html)
\ No newline at end of file
<section id="cryst_${id}" class="cryst" >
<div id="holder" style="width:${width};height:${height}"></div>
<div class="script_placeholder" data-src="/static/js/jquery.js"></div>
<div class="script_placeholder" data-src="/static/js/raphael.js"></div><div class="script_placeholder" data-src="/static/js/sylvester.js"></div><div class="script_placeholder" data-src="/static/js/underscore-min.js"></div>
<div class="script_placeholder" data-src="/static/js/${display_file}"></div>
<input type="hidden" name="answer_${id}" id="answer_${id}" class="asnwer"/>
</section>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment