/usr/lib/python2.7/dist-packages/zope/formlib/pageform.pt is in python-zope.formlib 4.3.0a2-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | <html metal:extend-macro="context/@@standard_macros/view"
metal:define-macro="main">
<head>
</head>
<body>
<div metal:fill-slot="body">
<div metal:define-macro="form">
<form action="." metal:define-macro="master"
tal:attributes="action request/URL" method="post"
class="edit-form" enctype="multipart/form-data"
id="zc.page.browser_form">
<script type="text/javascript"><!--
function toggleFormFieldHelp(ob,state) {
// ob is the label element
var field = findWidgetDiv(ob);
if (field) {
field.style.visibility = state && 'hidden' || 'visible';
var help = document.getElementById("field-help-for-" + ob.htmlFor);
if (help) {
help.style.visibility = state && 'visible' || 'hidden';
}
}
}
function findWidgetDiv(label) {
var element = findFormField(label);
while (element) {
element = element.parentNode;
if (element.tagName == 'DIV' && element.getAttribute('class') == 'widget')
return element;
}
}
function findFormField(label) {
var name = label.htmlFor;
var field = label.form[name];
// Multiple fields with the same name, such as radiobuttons
if (field) {
if (field.length)
field = field[0];
return field;
}
// No field with the exact name; find one that starts with the name
for (var i = 0; field = label.form[i++];) {
if (field.name.substr(0, name.length) == name)
return field;
}
}
//-->
</script>
<div id="viewspace" metal:define-slot="viewspace">
<h1 i18n:translate=""
tal:condition="view/label"
tal:content="view/label"
metal:define-slot="heading"
>Do something</h1>
<metal:block define-macro="header">
<div class="form-status"
tal:define="status view/status"
tal:condition="status">
<div class="summary"
i18n:translate=""
tal:content="view/status">
Form status summary
</div>
<ul class="errors" tal:condition="view/errors">
<li tal:repeat="error view/error_views">
<span tal:replace="structure error">Error Type</span>
</li>
</ul>
</div>
</metal:block>
<div metal:define-slot="extra_info" tal:replace="nothing">
</div>
<div metal:define-slot="main_form">
<table class="form-fields" metal:define-macro="formtable">
<tr class="row" metal:define-slot="extra_top" tal:replace="nothing">
<td class="label">Extra top</td>
<td class="field"><input type="text" /></td>
</tr>
<tbody metal:define-slot="formbody" tal:omit-tag="">
<tal:block omit-tag="" repeat="widget view/widgets">
<tr metal:define-macro="formrow">
<td class="label" tal:define="hint widget/hint"
metal:define-macro="labelcell">
<label tal:condition="python:hint"
tal:attributes="for widget/name"
onmousedown="toggleFormFieldHelp(this,1)"
onmouseup="toggleFormFieldHelp(this,0)"
onmouseout="toggleFormFieldHelp(this,0)"
style="cursor: help">
<span class="required" tal:condition="widget/required"
>*</span><span i18n:translate=""
tal:content="widget/label">label</span>
</label>
<label tal:condition="python:not hint"
tal:attributes="for widget/name">
<span class="required" tal:condition="widget/required"
>*</span><span i18n:translate=""
tal:content="widget/label">label</span>
</label>
</td>
<td class="field" tal:define="hint widget/hint"
metal:define-macro="widgetcell">
<div class="form-fields-help"
i18n:translate=""
tal:content="hint"
tal:condition="hint"
tal:attributes="id string:field-help-for-${widget/name}"
onclick="this.style.visibility='hidden';"
style="visibility: hidden; position: absolute;"
>Title of this content object.</div>
<div class="widget" tal:content="structure widget">
<input type="text" /></div>
<div class="error"
tal:condition="widget/error"
>
<!-- TODO Put this back, the Zope3 way.
<img src="alert.gif" alt="Error"
tal:replace="structure context/alert.gif" />
-->
<span tal:replace="structure widget/error">error</span>
</div>
</td>
</tr>
</tal:block>
</tbody>
<tr class="row" metal:define-slot="extra_bottom" tal:replace="nothing">
<td class="label">Extra bottom</td>
<td class="label"><input type="text" /></td>
</tr>
</table>
</div>
<metal:block define-slot="above_buttons" />
</div>
<div id="actionsView"
metal:define-macro="form_actions">
<span class="actionButtons"
tal:condition="view/availableActions"
metal:define-slot="bottom_buttons">
<input type="hidden"
name="___csrftoken__"
tal:condition="view/protected"
tal:attributes="value view/csrftoken"
/>
<input tal:repeat="action view/actions"
tal:replace="structure action/render"
/>
</span>
</div>
</form>
<script type="text/javascript"
tal:define="extra_script view/extra_script | nothing"
tal:condition="extra_script"
tal:content="structure extra_script" />
</div></div></body></html>
|