062bfdcdd0d8060beecbc005b2904418f612bdd9
[PlinnDocument.git] / skins / plinn_attachment_template.pt
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3 <html xmlns="http://www.w3.org/1999/xhtml"
4 tal:define="portal_url nocall:here/portal_url;
5 dummy python:request.RESPONSE.setHeader('Content-Type', 'text/html;;charset=utf-8')">
6
7 <head>
8 <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
9 <script type="text/javascript" defer="defer" tal:attributes="src here/epoz_script_detect.js/absolute_url"></script>
10 <script type="text/javascript" defer="defer" tal:attributes="src here/javascript_events_api.js/absolute_url"></script>
11 <link href="." rel="stylesheet" media="screen" tal:attributes="href here/zpt_stylesheet.css/absolute_url" />
12 <link href="." rel="stylesheet" media="screen" tal:attributes="href string:${portal_url}/plinn_style.css" />
13 <style>
14 body {background:#ccc;}
15 </style>
16 <script type="text/javascript">
17 //<!--
18 function hideUploadForm(formId) {
19 window.parent.document.getElementById(formId).style.visibility = "hidden" ;
20 }
21
22 function dispatchImageAndHideUploadForm(imgUrl, formId, epozInsert) {
23 var dispatcherId = (epozInsert) ? "EpozImgDispatcher" : "ImgDispatcher";
24 var dispatch = window.parent.document.getElementById(dispatcherId);
25 dispatch.value = imgUrl;
26 raiseMouseEvent(dispatch, 'click');
27 window.parent.document.getElementById(formId).style.visibility = "hidden" ;
28 }
29
30 function dispatchFileAndHideUploadForm(data, formId) {
31 var dispatch = window.parent.document.getElementById("AttachmentDispatcher");
32 dispatch.value = data;
33 raiseMouseEvent(dispatch, 'click');
34 window.parent.document.getElementById(formId).style.visibility = "hidden" ;
35 }
36 //-->
37 </script>
38 <title>Image upload form</title>
39 </head>
40
41 <body tal:attributes="onload options/onload"
42 i18n:domain="plinn">
43 <h3 i18n:translate="" tal:condition="python:options['formId']=='ImageUploadForm'">Insert image</h3>
44 <h3 i18n:translate="" tal:condition="python:options['formId']=='FileUploadForm'">Insert file</h3>
45 <form action="plinn_attachment_form" method="post" enctype="multipart/form-data">
46 <input type="hidden" name="formId" tal:attributes="value options/formId" />
47 <input type="file" name="file" size="16"/><input type="submit" name="upload" value="Upload" i18n:attributes="value" /><br>
48 <label tal:condition="python:options['formId']=='ImageUploadForm'">
49 <input type="checkbox" name="epozInsert:bool" value="True" />
50 <span i18n:translate="" tal:omit-tag="">Insert inside text</span>
51 </label>
52 </form>
53 <button onclick="hideUploadForm();" i18n:translate="" tal:attributes="onclick options/hideFormCode">Cancel</button>
54 </body>
55
56 </html>