ims.fieldupdater 3.0.0rc2__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.
- ims/fieldupdater/__init__.py +4 -2
- ims/fieldupdater/browser/__init__.py +1 -1
- ims/fieldupdater/browser/configure.zcml +15 -15
- ims/fieldupdater/browser/mass.pt +365 -265
- ims/fieldupdater/browser/mass.py +369 -370
- ims/fieldupdater/browser/schema.pt +66 -66
- ims/fieldupdater/configure.zcml +20 -20
- ims/fieldupdater/profiles/default/controlpanel.xml +10 -10
- ims/fieldupdater/profiles/default/metadata.xml +3 -3
- ims/fieldupdater/profiles/uninstall/controlpanel.xml +4 -4
- ims/fieldupdater/testing.py +53 -39
- {ims.fieldupdater-3.0.0rc2.dist-info → ims_fieldupdater-3.0.3.dist-info}/METADATA +20 -18
- ims_fieldupdater-3.0.3.dist-info/RECORD +15 -0
- {ims.fieldupdater-3.0.0rc2.dist-info → ims_fieldupdater-3.0.3.dist-info}/WHEEL +1 -2
- ims/__init__.py +0 -1
- ims/fieldupdater/tests/__init__.py +0 -1
- ims/fieldupdater/tests/base.py +0 -55
- ims/fieldupdater/tests/interfaces.py +0 -38
- ims/fieldupdater/tests/test_mass.py +0 -145
- ims/fieldupdater/tests/test_uninstall.py +0 -23
- ims.fieldupdater-3.0.0rc2.dist-info/RECORD +0 -22
- ims.fieldupdater-3.0.0rc2.dist-info/top_level.txt +0 -1
- {ims.fieldupdater-3.0.0rc2.dist-info → ims_fieldupdater-3.0.3.dist-info}/entry_points.txt +0 -0
ims/fieldupdater/browser/mass.pt
CHANGED
|
@@ -1,265 +1,365 @@
|
|
|
1
|
-
<html xmlns="http://www.w3.org/1999/xhtml"
|
|
2
|
-
lang="en-US"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<tal:block metal:fill-slot="top_slot">
|
|
8
|
-
<tal:block tal:define="
|
|
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
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
</
|
|
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>
|