/usr/lib/python2.7/dist-packages/zope/formlib/subpageform.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 | <div metal:define-macro="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>
<h1
i18n:translate=""
tal:condition="view/label"
tal:content="view/label"
metal:define-slot="heading"
>Do something</h1>
<div class="form-status"
tal:define="status view/status"
tal:condition="status">
<div class="summary" tal:content="view/status" i18n:translate="">
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>
<div metal:define-slot="extra_info" tal:replace="nothing">
</div>
<!--
<div class="form-controls" tal:condition="view/availableActions"
metal:define-slot="top_buttons">
<input tal:repeat="action view/actions"
tal:replace="structure action/render"
/>
</div>
-->
<table class="form-fields">
<tr class="row" metal:define-slot="extra_top" tal:replace="nothing">
<td class="label">Extra top</td>
<td class="label"><input type="text" /></td>
</tr>
<tbody metal:define-slot="formbody" tal:omit-tag="">
<tr tal:repeat="widget view/widgets">
<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"
tal:content="hint"
tal:condition="hint"
tal:attributes="id string:field-help-for-${widget/name}"
onclick="this.style.visibility='hidden';"
i18n:translate=""
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"
define="error widget/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>
</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 class="form-controls" 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"
/>
</div>
<script type="text/javascript"
tal:define="extra_script view/extra_script | nothing"
tal:condition="extra_script"
tal:content="structure extra_script" />
</div>
|