ims.fieldupdater 3.0.1__py3-none-any.whl → 3.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,265 +1,365 @@
1
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"
2
- lang="en-US"
3
- metal:use-macro="context/prefs_main_template/macros/master">
4
- <tal:icon tal:replace="structure python:icons.tag('plone-statusmessage-info', tag_alt='status', tag_class='statusmessage-icon mb-1 me-2')" />
5
- i18n:domain="ims.fieldupdater">
6
-
7
- <tal:block metal:fill-slot="top_slot">
8
- <tal:block tal:define="dummy python:request.set('disable_border',1)"/>
9
- </tal:block>
10
-
11
- <body>
12
- <div metal:fill-slot="prefs_configlet_main"
13
- tal:define="errors python:request.get('errors', {});
14
- search python:request.get('search', '');
15
- schema python:request.get('schema', '');
16
- field python:request.get('field', '');
17
- fkey python:request.get('fkey', '');
18
- match python:request.get('match', '');
19
- values view/get_values;
20
- results view/results">
21
-
22
- <h1 i18n:translate="heading_schema_field_manager">Schema Field Manager</h1>
23
-
24
- <div class="documentDescription">
25
- The Schema field manager allows you to delete and merge fields in your portal. As a reminder, you can
26
- use the <a target="_blank" href="${context/absolute_url}/manage_UndoForm">undo form</a> to
27
- rollback
28
- changes.
29
- </div>
30
-
31
- <tal:schema_fields tal:define="schemas view/get_schemas">
32
- <form action="${context/absolute_url}/mass-edit" method="get">
33
- <fieldset>
34
- <legend>
35
- Choose Schema
36
- </legend>
37
- <p>
38
- If you are unsure of the schema you are looking for but you know the content type, try the
39
- <a href="${context/absolute_url}/schema-finder">schema finder</a>.
40
- </p>
41
-
42
- <div class="field">
43
- <label for="schemafield" i18n:translate="label_schema_field">
44
- Schema
45
- </label>
46
-
47
- <select id="schemafield" name="schema"
48
- onchange="javascript:this.form.submit()">
49
- <option tal:repeat="fld schemas"
50
- value="${fld/id}"
51
- selected="${python:fld['id']==schema}"
52
- i18n:translate=""
53
- i18n:domain="plone">
54
- ${fld/title}
55
- </option>
56
- </select>
57
-
58
- <span tal:condition="schema"
59
- tal:define="schema_matches python:view.schema_matches(schema)">
60
- Objects providing this interface: ${schema_matches}
61
- </span>
62
- </div>
63
-
64
- <div class="formControls">
65
- <input class="btn btn-primary"
66
- type="submit"
67
- value="Select Schema"
68
- i18n:attributes="value"/>
69
- </div>
70
-
71
- </fieldset>
72
- </form>
73
- </tal:schema_fields>
74
-
75
- <tal:schema_selected condition="schema">
76
- <form action="${context/absolute_url}/mass-edit" method="get"
77
- tal:define="fields view/get_fields">
78
-
79
- <input type="hidden" name="schema" value="${schema}"/>
80
- <fieldset id="fieldset-schema">
81
- <legend>
82
- Choose Field
83
- </legend>
84
-
85
- <div class="field">
86
- <label for="fieldfield" i18n:translate="label_field_field">
87
- Field
88
- </label>
89
-
90
- <select id="fieldfield" name="field"
91
- onchange="javascript:this.form.submit()">
92
- <option tal:repeat="fld fields"
93
- value="${fld/id}"
94
- selected="${python:fld['id']==field}"
95
- i18n:translate=""
96
- i18n:domain="plone">
97
- ${fld/title}
98
- </option>
99
- </select>
100
- </div>
101
-
102
- <div class="formControls">
103
- <input class="btn btn-primary"
104
- type="submit"
105
- value="Select Field"
106
- i18n:attributes="value"/>
107
- </div>
108
-
109
- </fieldset>
110
- </form>
111
- </tal:schema_selected>
112
-
113
- <tal:schema_data_grid condition="view/is_dg">
114
- <form action="${context/absolute_url}/mass-edit" method="get"
115
- tal:define="dgkeys view/get_dgkeys">
116
-
117
- <input type="hidden" name="schema" value="${schema}"/>
118
- <input type="hidden" name="field" value="${field}"/>
119
- <fieldset id="fieldset-field">
120
- <legend>
121
- Choose DataGrid Key
122
- </legend>
123
-
124
- <div class="field">
125
- <label for="fkeyfield" i18n:translate="labelfkey_field">
126
- Key
127
- </label>
128
-
129
- <select id="dgkeyfield" name="fkey"
130
- onchange="javascript:this.form.submit()">
131
- <option tal:repeat="dgkey dgkeys"
132
- value="${dgkey/id}"
133
- selected="${python:dgkey['id']==fkey}"
134
- i18n:translate=""
135
- i18n:domain="plone">
136
- ${dgkey/title}
137
- </option>
138
- </select>
139
- </div>
140
-
141
- <div class="formControls">
142
- <input class="btn btn-primary"
143
- type="submit"
144
- value="Select DataGrid Key"
145
- i18n:attributes="value"/>
146
- </div>
147
-
148
- </fieldset>
149
- </form>
150
- </tal:schema_data_grid>
151
-
152
- <tal:unsupported condition="view/unsupported">
153
- Unsupported value type for this field: ${view/unsupported}. Unfortunately this data
154
- type is not convertable through this form.
155
- </tal:unsupported>
156
-
157
- <tal:values condition="values">
158
- <form action="${context/absolute_url}/mass-edit" method="get"
159
- tal:attributes="action string:">
160
-
161
- <input type="hidden" name="schema" value="${schema}"/>
162
- <input type="hidden" name="field" value="${field}"/>
163
- <input type="hidden" name="fkey" value="${fkey}"/>
164
- <fieldset id="fieldset-fkey">
165
- <legend>
166
- Choose Current Value
167
- </legend>
168
-
169
- <div class="field">
170
- <label for="fkeyfield" i18n:translate="labelfkey_field">
171
- Matching Value
172
- </label>
173
-
174
- <select id="valuefield" name="match"
175
- onchange="javascript:this.form.submit()">
176
- <option tal:repeat="value values"
177
- value="${value}"
178
- selected="${python:value==match}"
179
- i18n:translate=""
180
- i18n:domain="plone">
181
- ${value}
182
- </option>
183
- </select>
184
- </div>
185
-
186
- <div class="formControls">
187
- <input class="btn btn-primary"
188
- type="submit"
189
- name="form.button.Merge"
190
- title="Select value"
191
- i18n:attributes="value; title"
192
- value="Select value">
193
- </div>
194
- </fieldset>
195
- </form>
196
- </tal:values>
197
-
198
- <tal:no_results tal:condition="python:field and not results">
199
- No values found for this field.
200
- </tal:no_results>
201
-
202
- <tal:replace_or_delete tal:condition="results">
203
- <form action="mass-edit" method="post"
204
- tal:attributes="action string:${context/absolute_url}/mass-edit">
205
- <input type="hidden" name="schema" value="${schema}"/>
206
- <input type="hidden" name="field" value="${field}"/>
207
- <input type="hidden" name="fkey" value="${fkey}"/>
208
- <input type="hidden" name="match" value="${match}"/>
209
-
210
- <fieldset id="fieldset-match">
211
- <legend>
212
- Current Matches
213
- </legend>
214
-
215
- <div class="portalMessage statusmessage statusmessage-warn alert alert-warning">
216
- <tal:icon tal:replace="structure python:icons.tag('plone-statusmessage-info', tag_alt='status', tag_class='statusmessage-icon mb-1 me-2')" />
217
- <div>Warning</div>
218
- Proceed with caution! All content listed here will be affected by modification or deletion.
219
- </div>
220
-
221
- <ul>
222
- <tal:result repeat="result results">
223
- <li>
224
- <a href="${result/getURL}"
225
- target="_blank">
226
- ${result/Title}
227
- </a>
228
- </li>
229
- </tal:result>
230
- </ul>
231
-
232
- <div class="field">
233
- <div class="error"
234
- tal:define="err errors/changeto|nothing"
235
- tal:condition="err" i18n:translate="">
236
- ${err}
237
- </div>
238
- <label for="replacement" i18n:translate="">Value to apply</label>
239
- <!--<input id="replacement" type="text" name="replacement"/>-->
240
- <input type="hidden" name="replacement_marker" value="1"/>
241
- <span tal:replace="structure python:view.replacement_widget.render()"/>
242
- </div>
243
-
244
- <div class="formControls">
245
- <input class="btn btn-warning"
246
- type="submit"
247
- name="form.button.Merge"
248
- title="Replace all values"
249
- i18n:attributes="value; title"
250
- value="Replace with this value">
251
-
252
- <input class="btn btn-warning"
253
- id="input_delete_keyword"
254
- type="submit"
255
- name="form.button.Delete"
256
- i18n:attributes="value; title"
257
- title="Remove values"
258
- value="Remove this value"/>
259
- </div>
260
- </fieldset>
261
- </form>
262
- </tal:replace_or_delete>
263
- </div>
264
- </body>
265
- </html>
1
+ <html xmlns="http://www.w3.org/1999/xhtml"
2
+ lang="en-US"
3
+ metal:use-macro="context/prefs_main_template/macros/master"
4
+ xml:lang="en-US"
5
+ >
6
+
7
+ <tal:block metal:fill-slot="top_slot">
8
+ <tal:block tal:define="
9
+ dummy python:request.set('disable_border',1);
10
+ " />
11
+ </tal:block>
12
+
13
+ <body>
14
+ <div metal:fill-slot="prefs_configlet_main"
15
+ tal:define="
16
+ errors python:request.get('errors', {});
17
+ search python:request.get('search', '');
18
+ schema python:request.get('schema', '');
19
+ field python:request.get('field', '');
20
+ fkey python:request.get('fkey', '');
21
+ match python:request.get('match', '');
22
+ values view/get_values;
23
+ results view/results;
24
+ "
25
+ >
26
+
27
+ <h1 i18n:translate="heading_schema_field_manager">Schema Field Manager</h1>
28
+
29
+ <div class="documentDescription">
30
+ The Schema field manager allows you to delete and merge fields in your portal. As a reminder, you can
31
+ use the
32
+ <a href="${context/absolute_url}/manage_UndoForm"
33
+ target="_blank"
34
+ >undo form</a>
35
+ to
36
+ rollback
37
+ changes.
38
+ </div>
39
+
40
+ <tal:schema_fields tal:define="
41
+ schemas view/get_schemas;
42
+ ">
43
+ <form action="${context/absolute_url}/mass-edit"
44
+ method="get"
45
+ >
46
+ <fieldset>
47
+ <legend>
48
+ Choose Schema
49
+ </legend>
50
+ <p>
51
+ If you are unsure of the schema you are looking for but you know the content type, try the
52
+ <a href="${context/absolute_url}/schema-finder">schema finder</a>.
53
+ </p>
54
+
55
+ <div class="field">
56
+ <label class="form-label"
57
+ for="schemafield"
58
+ i18n:translate="label_schema_field"
59
+ >
60
+ Schema
61
+ </label>
62
+
63
+ <select class="form-control"
64
+ id="schemafield"
65
+ name="schema"
66
+ onchange="javascript:this.form.submit()"
67
+ >
68
+ <option selected="${python:fld['id']==schema}"
69
+ value="${fld/id}"
70
+ tal:repeat="fld schemas"
71
+ i18n:domain="plone"
72
+ i18n:translate=""
73
+ >
74
+ ${fld/title}
75
+ </option>
76
+ </select>
77
+
78
+ <span tal:define="
79
+ schema_matches python:view.schema_matches(schema);
80
+ "
81
+ tal:condition="schema"
82
+ >
83
+ Objects providing this interface: ${schema_matches}
84
+ </span>
85
+ </div>
86
+
87
+ <div class="formControls">
88
+ <input class="btn btn-primary"
89
+ type="submit"
90
+ value="Select Schema"
91
+ i18n:attributes="value"
92
+ />
93
+ </div>
94
+
95
+ </fieldset>
96
+ </form>
97
+ </tal:schema_fields>
98
+
99
+ <tal:schema_selected condition="schema">
100
+ <form action="${context/absolute_url}/mass-edit"
101
+ method="get"
102
+ tal:define="
103
+ fields view/get_fields;
104
+ "
105
+ >
106
+
107
+ <input name="schema"
108
+ type="hidden"
109
+ value="${schema}"
110
+ />
111
+ <fieldset id="fieldset-schema">
112
+ <legend>
113
+ Choose Field
114
+ </legend>
115
+
116
+ <div class="field">
117
+ <label for="fieldfield"
118
+ i18n:translate="label_field_field"
119
+ >
120
+ Field
121
+ </label>
122
+
123
+ <select id="fieldfield"
124
+ name="field"
125
+ onchange="javascript:this.form.submit()"
126
+ >
127
+ <option selected="${python:fld['id']==field}"
128
+ value="${fld/id}"
129
+ tal:repeat="fld fields"
130
+ i18n:domain="plone"
131
+ i18n:translate=""
132
+ >
133
+ ${fld/title}
134
+ </option>
135
+ </select>
136
+ </div>
137
+
138
+ <div class="formControls">
139
+ <input class="btn btn-primary"
140
+ type="submit"
141
+ value="Select Field"
142
+ i18n:attributes="value"
143
+ />
144
+ </div>
145
+
146
+ </fieldset>
147
+ </form>
148
+ </tal:schema_selected>
149
+
150
+ <tal:schema_data_grid condition="view/is_dg">
151
+ <form action="${context/absolute_url}/mass-edit"
152
+ method="get"
153
+ tal:define="
154
+ dgkeys view/get_dgkeys;
155
+ "
156
+ >
157
+
158
+ <input name="schema"
159
+ type="hidden"
160
+ value="${schema}"
161
+ />
162
+ <input name="field"
163
+ type="hidden"
164
+ value="${field}"
165
+ />
166
+ <fieldset id="fieldset-field">
167
+ <legend>
168
+ Choose DataGrid Key
169
+ </legend>
170
+
171
+ <div class="field">
172
+ <label for="fkeyfield"
173
+ i18n:translate="labelfkey_field"
174
+ >
175
+ Key
176
+ </label>
177
+
178
+ <select id="dgkeyfield"
179
+ name="fkey"
180
+ onchange="javascript:this.form.submit()"
181
+ >
182
+ <option selected="${python:dgkey['id']==fkey}"
183
+ value="${dgkey/id}"
184
+ tal:repeat="dgkey dgkeys"
185
+ i18n:domain="plone"
186
+ i18n:translate=""
187
+ >
188
+ ${dgkey/title}
189
+ </option>
190
+ </select>
191
+ </div>
192
+
193
+ <div class="formControls">
194
+ <input class="btn btn-primary"
195
+ type="submit"
196
+ value="Select DataGrid Key"
197
+ i18n:attributes="value"
198
+ />
199
+ </div>
200
+
201
+ </fieldset>
202
+ </form>
203
+ </tal:schema_data_grid>
204
+
205
+ <tal:unsupported condition="view/unsupported">
206
+ Unsupported value type for this field: ${view/unsupported}. Unfortunately this data
207
+ type is not convertable through this form.
208
+ </tal:unsupported>
209
+
210
+ <tal:values condition="values">
211
+ <form action="${context/absolute_url}/mass-edit"
212
+ method="get"
213
+ tal:attributes="
214
+ action string:;
215
+ "
216
+ >
217
+
218
+ <input name="schema"
219
+ type="hidden"
220
+ value="${schema}"
221
+ />
222
+ <input name="field"
223
+ type="hidden"
224
+ value="${field}"
225
+ />
226
+ <input name="fkey"
227
+ type="hidden"
228
+ value="${fkey}"
229
+ />
230
+ <fieldset id="fieldset-fkey">
231
+ <legend>
232
+ Choose Current Value
233
+ </legend>
234
+
235
+ <div class="field">
236
+ <label for="fkeyfield"
237
+ i18n:translate="labelfkey_field"
238
+ >
239
+ Matching Value
240
+ </label>
241
+
242
+ <select id="valuefield"
243
+ name="match"
244
+ onchange="javascript:this.form.submit()"
245
+ >
246
+ <option selected="${python:value==match}"
247
+ value="${value}"
248
+ tal:repeat="value values"
249
+ i18n:domain="plone"
250
+ i18n:translate=""
251
+ >
252
+ ${value}
253
+ </option>
254
+ </select>
255
+ </div>
256
+
257
+ <div class="formControls">
258
+ <input class="btn btn-primary"
259
+ name="form.button.Merge"
260
+ title="Select value"
261
+ type="submit"
262
+ value="Select value"
263
+ i18n:attributes="value; title"
264
+ />
265
+ </div>
266
+ </fieldset>
267
+ </form>
268
+ </tal:values>
269
+
270
+ <tal:no_results tal:condition="python:field and not results">
271
+ No values found for this field.
272
+ </tal:no_results>
273
+
274
+ <tal:replace_or_delete tal:condition="results">
275
+ <form action="mass-edit"
276
+ method="post"
277
+ tal:attributes="
278
+ action string:${context/absolute_url}/mass-edit;
279
+ "
280
+ >
281
+ <input name="schema"
282
+ type="hidden"
283
+ value="${schema}"
284
+ />
285
+ <input name="field"
286
+ type="hidden"
287
+ value="${field}"
288
+ />
289
+ <input name="fkey"
290
+ type="hidden"
291
+ value="${fkey}"
292
+ />
293
+ <input name="match"
294
+ type="hidden"
295
+ value="${match}"
296
+ />
297
+
298
+ <fieldset id="fieldset-match">
299
+ <legend>
300
+ Current Matches
301
+ </legend>
302
+
303
+ <div class="portalMessage statusmessage statusmessage-warn alert alert-warning">
304
+ <tal:icon tal:replace="structure python:icons.tag('plone-statusmessage-info', tag_alt='status', tag_class='statusmessage-icon mb-1 me-2')" />
305
+ <div>Warning</div>
306
+ Proceed with caution! All content listed here will be affected by modification or deletion.
307
+ </div>
308
+
309
+ <ul>
310
+ <tal:result repeat="result results">
311
+ <li>
312
+ <a href="${result/getURL}"
313
+ target="_blank"
314
+ >
315
+ ${result/Title}
316
+ </a>
317
+ </li>
318
+ </tal:result>
319
+ </ul>
320
+
321
+ <div class="field">
322
+ <div class="error"
323
+ tal:define="
324
+ err errors/changeto|nothing;
325
+ "
326
+ tal:condition="err"
327
+ i18n:translate=""
328
+ >
329
+ ${err}
330
+ </div>
331
+ <label for="replacement"
332
+ i18n:translate=""
333
+ >Value to apply</label>
334
+ <!--<input id="replacement" type="text" name="replacement"/>-->
335
+ <input name="replacement_marker"
336
+ type="hidden"
337
+ value="1"
338
+ />
339
+ <span tal:replace="structure python:view.replacement_widget.render()"></span>
340
+ </div>
341
+
342
+ <div class="formControls">
343
+ <input class="btn btn-warning"
344
+ name="form.button.Merge"
345
+ title="Replace all values"
346
+ type="submit"
347
+ value="Replace with this value"
348
+ i18n:attributes="value; title"
349
+ />
350
+
351
+ <input class="btn btn-warning"
352
+ id="input_delete_keyword"
353
+ name="form.button.Delete"
354
+ title="Remove values"
355
+ type="submit"
356
+ value="Remove this value"
357
+ i18n:attributes="value; title"
358
+ />
359
+ </div>
360
+ </fieldset>
361
+ </form>
362
+ </tal:replace_or_delete>
363
+ </div>
364
+ </body>
365
+ </html>