1 | <html xmlns="http://www.w3.org/1999/xhtml"
|
---|
2 | xml:lang="en"
|
---|
3 | lang="en"
|
---|
4 | xmlns:tal="http://xml.zope.org/namespaces/tal"
|
---|
5 | xmlns:metal="http://xml.zope.org/namespaces/metal"
|
---|
6 | xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
---|
7 | i18n:domain="plone">
|
---|
8 | <head><title></title></head>
|
---|
9 | <body>
|
---|
10 |
|
---|
11 | <div metal:define-macro="header">
|
---|
12 | <h1 i18n:translate="heading_edit_item"
|
---|
13 | metal:define-slot="title">
|
---|
14 | Edit
|
---|
15 | <span i18n:name="itemtype"
|
---|
16 | tal:define="fti python:here.portal_types.getTypeInfo(here)">
|
---|
17 | <span i18n:translate=""
|
---|
18 | tal:content="fti/title_or_id"
|
---|
19 | tal:omit-tag="">Item type</span>
|
---|
20 | </span>
|
---|
21 | </h1>
|
---|
22 |
|
---|
23 | <div id="archetypes-schemata-links"
|
---|
24 | tal:condition="fieldsets">
|
---|
25 | <tal:block repeat="set fieldsets">
|
---|
26 | <tal:current condition="python:set == fieldset and fieldsets != ['default']">
|
---|
27 | <strong>[<span tal:content="set" i18n:translate="" />]</strong>
|
---|
28 | </tal:current>
|
---|
29 | <tal:others condition="python:set != fieldset">
|
---|
30 | <a href="#" tal:attributes="href string:${here/absolute_url}/${template/getId}?fieldset=${set}">
|
---|
31 | [<span tal:content="set" i18n:translate="" />]</a>
|
---|
32 | </tal:others>
|
---|
33 | </tal:block>
|
---|
34 | </div>
|
---|
35 | <metal:block define-slot="extra_info" />
|
---|
36 |
|
---|
37 | <p class="portalMessage"
|
---|
38 | tal:condition="isLocked"
|
---|
39 | i18n:translate="description_webdav_locked">
|
---|
40 | This item is in use by someone else and cannot be modified
|
---|
41 | </p>
|
---|
42 |
|
---|
43 | </div>
|
---|
44 |
|
---|
45 | <div metal:define-macro="typedescription">
|
---|
46 | <tal:description tal:define="msgid here/typeDescMsgId | nothing;
|
---|
47 | default here/typeDescription| nothing;"
|
---|
48 | tal:condition="default">
|
---|
49 |
|
---|
50 | <p tal:content="python:here.translate(msgid=msgid, default=default)">
|
---|
51 | type description
|
---|
52 | </p>
|
---|
53 |
|
---|
54 | </tal:description>
|
---|
55 | </div>
|
---|
56 |
|
---|
57 | <div metal:define-macro="body">
|
---|
58 | <form name="edit_form"
|
---|
59 | method="post"
|
---|
60 | enctype="multipart/form-data"
|
---|
61 | action=""
|
---|
62 | tal:attributes="action python:here.absolute_url()+'/'+template.id">
|
---|
63 |
|
---|
64 | <fieldset>
|
---|
65 |
|
---|
66 | <legend tal:define="iconname python: here.getIcon(1);
|
---|
67 | icon python: here.portal_url() + '/' + iconname">
|
---|
68 |
|
---|
69 | <img alt="" tal:attributes="src icon" />
|
---|
70 |
|
---|
71 | <tal:legend define="fieldset python:(len(fieldsets) > 1 and fieldset != 'default') and fieldset">
|
---|
72 | <tal:fieldset i18n:translate="legend_fieldset_details"
|
---|
73 | tal:condition="fieldset">
|
---|
74 | <span i18n:name="fieldset">
|
---|
75 | <span i18n:translate=""
|
---|
76 | tal:content="fieldset" />
|
---|
77 | </span>
|
---|
78 | Details
|
---|
79 | </tal:fieldset>
|
---|
80 | <tal:type i18n:translate="legend_type_details"
|
---|
81 | tal:condition="not: fieldset">
|
---|
82 | <span i18n:name="type" tal:define="fti python:here.portal_types.getTypeInfo(here)">
|
---|
83 |
|
---|
84 | <span i18n:translate=""
|
---|
85 | tal:content="fti/title_or_id" />
|
---|
86 | </span>
|
---|
87 | Details
|
---|
88 | </tal:type>
|
---|
89 | </tal:legend>
|
---|
90 | </legend>
|
---|
91 |
|
---|
92 | <metal:block define-slot="extra_top" />
|
---|
93 |
|
---|
94 | <metal:block define-slot="widgets">
|
---|
95 | <tal:fields repeat="field fields">
|
---|
96 | <!--tal:block condition="python: not (field.getName()=='tags' and here.isTagsEnabled())" -->
|
---|
97 | <metal:fieldMacro use-macro="python:here.widget(field.getName(), mode='edit')" />
|
---|
98 | <!--/tal:block-->
|
---|
99 | </tal:fields>
|
---|
100 | </metal:block>
|
---|
101 |
|
---|
102 | <metal:block define-slot="extra_bottom" />
|
---|
103 |
|
---|
104 | <div class="formControls">
|
---|
105 |
|
---|
106 | <input type="hidden"
|
---|
107 | name="fieldset"
|
---|
108 | value="default"
|
---|
109 | tal:attributes="value fieldset"
|
---|
110 | />
|
---|
111 | <input type="hidden"
|
---|
112 | name="form.submitted"
|
---|
113 | value="1"
|
---|
114 | />
|
---|
115 | <input type="hidden"
|
---|
116 | name="add_reference.field:record"
|
---|
117 | value=""
|
---|
118 | />
|
---|
119 | <input type="hidden"
|
---|
120 | name="add_reference.type:record"
|
---|
121 | value=""
|
---|
122 | />
|
---|
123 | <input type="hidden"
|
---|
124 | name="add_reference.destination:record"
|
---|
125 | value=""
|
---|
126 | />
|
---|
127 |
|
---|
128 | <tal:env define="env request/controller_state/kwargs">
|
---|
129 | <tal:loop repeat="varname python:('reference_source_url', 'reference_source_field', 'reference_source_fieldset')">
|
---|
130 | <tal:reference define="items python:env.get(varname, request.get(varname))"
|
---|
131 | condition="items">
|
---|
132 | <input tal:repeat="item items"
|
---|
133 | type="hidden"
|
---|
134 | name="form_env.reference_source_url:list:record"
|
---|
135 | value="value"
|
---|
136 | tal:attributes="value item;
|
---|
137 | name string:form_env.${varname}:list:record"
|
---|
138 | />
|
---|
139 | </tal:reference>
|
---|
140 | </tal:loop>
|
---|
141 | </tal:env>
|
---|
142 |
|
---|
143 | <tal:comment replace="nothing">
|
---|
144 | Turn 'persistent_' variables from controller_state persistent
|
---|
145 | </tal:comment>
|
---|
146 | <tal:env repeat="env request/controller_state/kwargs/items">
|
---|
147 | <input type="hidden"
|
---|
148 | name="key"
|
---|
149 | value="value"
|
---|
150 | tal:define="key python:env[0];
|
---|
151 | value python:env[1]"
|
---|
152 | tal:condition="python:key.startswith('persistent_')"
|
---|
153 | tal:attributes="name string:form_env.${key}:record;
|
---|
154 | value value"
|
---|
155 | />
|
---|
156 | </tal:env>
|
---|
157 |
|
---|
158 | <tal:comment replace="nothing">
|
---|
159 | Turn 'persistent_' variables from forms (GET/POST) persistent
|
---|
160 | </tal:comment>
|
---|
161 | <tal:env repeat="env request/form">
|
---|
162 | <input type="hidden"
|
---|
163 | name="key"
|
---|
164 | value="value"
|
---|
165 | tal:define="key env;
|
---|
166 | value request/?env"
|
---|
167 | tal:condition="python:key.startswith('persistent_')"
|
---|
168 | tal:attributes="name string:form_env.${key}:record;
|
---|
169 | value value"
|
---|
170 | />
|
---|
171 | </tal:env>
|
---|
172 |
|
---|
173 | <tal:comment replace="nothing">
|
---|
174 | Store referrer to remember where to go back
|
---|
175 | </tal:comment>
|
---|
176 | <input type="hidden"
|
---|
177 | name="last_referer"
|
---|
178 | tal:define="last_referer python:here.session_restore_value('HTTP_REFERER', request.form.get('last_referer', request.get('HTTP_REFERER')))"
|
---|
179 | tal:attributes="value python:(last_referer and '%s/%s' % (here.absolute_url(), template.id) not in last_referer) and last_referer or here.aq_parent.absolute_url()"
|
---|
180 | />
|
---|
181 |
|
---|
182 | <metal:block define-slot="buttons"
|
---|
183 | tal:define="fieldset_index python:fieldsets.index(fieldset);
|
---|
184 | n_fieldsets python:len(fieldsets)">
|
---|
185 |
|
---|
186 | <input tal:condition="python:fieldset_index > 0"
|
---|
187 | class="context"
|
---|
188 | tabindex=""
|
---|
189 | type="submit"
|
---|
190 | name="form_previous"
|
---|
191 | value="Previous"
|
---|
192 | i18n:attributes="value"
|
---|
193 | tal:attributes="tabindex tabindex/next;
|
---|
194 | disabled python:test(isLocked, 'disabled', None);"
|
---|
195 | />
|
---|
196 | <input tal:condition="python:fieldset_index < n_fieldsets - 1"
|
---|
197 | class="context"
|
---|
198 | tabindex=""
|
---|
199 | type="submit"
|
---|
200 | name="form_next"
|
---|
201 | value="Next"
|
---|
202 | i18n:attributes="value"
|
---|
203 | tal:attributes="tabindex tabindex/next;
|
---|
204 | disabled python:test(isLocked, 'disabled', None);"
|
---|
205 | />
|
---|
206 | <input class="context"
|
---|
207 | tabindex=""
|
---|
208 | type="submit"
|
---|
209 | name="form_submit"
|
---|
210 | value="Save"
|
---|
211 | i18n:attributes="value"
|
---|
212 | tal:attributes="tabindex tabindex/next;
|
---|
213 | disabled python:test(isLocked, 'disabled', None);"
|
---|
214 | />
|
---|
215 | <input class="standalone"
|
---|
216 | tabindex=""
|
---|
217 | type="submit"
|
---|
218 | name="form.button.cancel"
|
---|
219 | value="Cancel"
|
---|
220 | i18n:attributes="value"
|
---|
221 | tal:attributes="tabindex tabindex/next"
|
---|
222 | />
|
---|
223 | </metal:block>
|
---|
224 |
|
---|
225 | <metal:block define-slot="extra_buttons" />
|
---|
226 |
|
---|
227 | </div>
|
---|
228 |
|
---|
229 | </fieldset>
|
---|
230 |
|
---|
231 | </form>
|
---|
232 |
|
---|
233 | </div>
|
---|
234 |
|
---|
235 | <metal:footer_macro define-macro="footer">
|
---|
236 | <tal:has_document_byline tal:condition="exists:here/document_byline">
|
---|
237 | <div metal:use-macro="here/document_byline/macros/byline">
|
---|
238 | Get the byline - contains details about author and modification date.
|
---|
239 | </div>
|
---|
240 | </tal:has_document_byline>
|
---|
241 | </metal:footer_macro>
|
---|
242 |
|
---|
243 | </body>
|
---|
244 |
|
---|
245 | </html>
|
---|