paul@0 | 1 | <html> |
paul@0 | 2 | <head> |
paul@0 | 3 | <link rel="stylesheet" type="text/css" href="@@file/style.css" /> |
paul@0 | 4 | <meta http-equiv="Content-Type" |
paul@0 | 5 | tal:attributes="content string:text/html;; charset=${request/client/charset}" /> |
paul@0 | 6 | <tal:block tal:condition="python:request.form.has_key('property')"> |
paul@0 | 7 | <title>Generic submit page for framed helper windows</title> |
paul@0 | 8 | <script language="Javascript" type="text/javascript" |
paul@0 | 9 | tal:content="structure string:<!-- |
paul@0 | 10 | // this is the name of the field in the original form that we're working on |
paul@0 | 11 | form = parent.opener.document.${request/form/form/value}; |
paul@0 | 12 | callingform=form |
paul@0 | 13 | field = '${request/form/property/value}'; |
paul@0 | 14 | var listform = null |
paul@0 | 15 | function listPresent() { |
paul@0 | 16 | return document.frm_help.cb_listpresent.checked |
paul@0 | 17 | } |
paul@0 | 18 | function getListForm() { |
paul@0 | 19 | if (listPresent()) { |
paul@0 | 20 | return parent.list.document.forms.dummyform |
paul@0 | 21 | } else { |
paul@0 | 22 | return null |
paul@0 | 23 | } |
paul@0 | 24 | } |
paul@0 | 25 | |
paul@0 | 26 | |
paul@0 | 27 | function checkListForm() { |
paul@0 | 28 | // global listform |
paul@0 | 29 | if (listform != null) |
paul@0 | 30 | if (parent.list.document.dummyform) { |
paul@0 | 31 | listform = parent.list.document.dummyform |
paul@0 | 32 | alert(listform) |
paul@0 | 33 | } |
paul@0 | 34 | |
paul@0 | 35 | var bol= listform != null |
paul@0 | 36 | alert('checkListForm: bol='+bol) |
paul@0 | 37 | return bol |
paul@0 | 38 | } |
paul@0 | 39 | //-->"> |
paul@0 | 40 | </script> |
paul@0 | 41 | <script src="@@file/help_controls.js" type="text/javascript"></script> |
paul@0 | 42 | </tal:block> |
paul@0 | 43 | </head> |
paul@0 | 44 | <body class="body" onload="parent.focus();" id="submit"> |
paul@0 | 45 | <pre tal:content="request/env/QUERY_STRING" tal:condition=false /> |
paul@0 | 46 | <form name="frm_help" |
paul@0 | 47 | tal:define="batch request/batch; |
paul@0 | 48 | props python:request.form['properties'].value.split(',')" |
paul@0 | 49 | class="help-submit" |
paul@0 | 50 | id="classhelp-controls"> |
paul@0 | 51 | <div style="width:100%;text-align:left;margin-bottom:0.2em"> |
paul@0 | 52 | <input type="text" name="text_preview" size="24" class="preview" |
paul@0 | 53 | onchange="f=getListForm();if(f){ reviseList_framed(f, this)};" |
paul@0 | 54 | /> |
paul@0 | 55 | </div> |
paul@0 | 56 | <input type=checkbox name="cb_listpresent" readonly="readonly" style="display:none"> |
paul@0 | 57 | <input type="button" id="btn_cancel" |
paul@0 | 58 | value=" Cancel " onclick="parent.close();return false;" |
paul@0 | 59 | i18n:attributes="value" /> |
paul@0 | 60 | <input type="reset" id="btn_reset" |
paul@0 | 61 | onclick="text_field.value=original_field;f=getListForm();if (f) {reviseList_framed(f, this)};return false" |
paul@0 | 62 | /> |
paul@0 | 63 | <input type="submit" id="btn_apply" class="apply" |
paul@0 | 64 | value=" Apply " onclick="callingform[field].value=text_field.value; parent.close();" |
paul@0 | 65 | i18n:attributes="value" /> |
paul@0 | 66 | </form> |
paul@0 | 67 | <script type="text/javascript"><!-- |
paul@0 | 68 | var text_field = document.frm_help.text_preview; |
paul@0 | 69 | original_field=form[field].value; |
paul@0 | 70 | text_field.value=original_field; |
paul@0 | 71 | //--></script> |
paul@0 | 72 | </body> |
paul@0 | 73 | </html> |