Lines 5-13
Link Here
|
5 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
6 |
<title>Koha › Tools › MARC modification templates</title> |
6 |
<title>Koha › Tools › MARC modification templates</title> |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
8 |
<style> |
8 |
[% FILTER collapse %] |
9 |
#add_action { display: none; } |
9 |
<style> |
10 |
</style> |
10 |
#add_action { |
|
|
11 |
display: none; |
12 |
} |
13 |
|
14 |
.action_line { |
15 |
margin-bottom: 1em; |
16 |
} |
17 |
</style> |
18 |
[% END %] |
11 |
</head> |
19 |
</head> |
12 |
|
20 |
|
13 |
<body id="tools_marc_modification_templates" class="tools"> |
21 |
<body id="tools_marc_modification_templates" class="tools"> |
Lines 183-266
Link Here
|
183 |
<legend id="modaction_legend">Add a new action</legend> |
191 |
<legend id="modaction_legend">Add a new action</legend> |
184 |
<div id="warning_multivalued" style="color:red; display:none;">You have chosen a condition on the same field as the original field. If your records contain multivalued fields it is highly recommended not to do that.</div> |
192 |
<div id="warning_multivalued" style="color:red; display:none;">You have chosen a condition on the same field as the original field. If your records contain multivalued fields it is highly recommended not to do that.</div> |
185 |
|
193 |
|
186 |
<select name="action" id="action" onchange="onActionChange(this);"> |
194 |
<div class="action_line"> |
187 |
<option value="delete_field">Delete</option> |
195 |
<select name="action" id="action" onchange="onActionChange(this);"> |
188 |
<option value="add_field">Add new</option> |
196 |
<option value="delete_field">Delete</option> |
189 |
<option value="update_field">Update existing or add new</option> |
197 |
<option value="add_field">Add new</option> |
190 |
<option value="move_field">Move</option> |
198 |
<option value="update_field">Update existing or add new</option> |
191 |
<option value="copy_field">Copy</option> |
199 |
<option value="move_field">Move</option> |
192 |
<option value="copy_and_replace_field">Copy and replace</option> |
200 |
<option value="copy_field">Copy</option> |
193 |
</select> |
201 |
<option value="copy_and_replace_field">Copy and replace</option> |
194 |
|
|
|
195 |
<span id="field_number_block"> |
196 |
<select name="field_number" id="field_number"> |
197 |
<option value="0">All</option> |
198 |
<option value="1">1st</option> |
199 |
</select> |
202 |
</select> |
200 |
</span> |
|
|
201 |
|
202 |
field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" title="let blank for the entire field" /> |
203 |
|
203 |
|
204 |
<span name="with_value_block" id="with_value_block" style="display:none;"> |
204 |
<span id="field_number_block"> |
205 |
with value <input type="text" name="field_value" id="field_value" /> |
205 |
<select name="field_number" id="field_number"> |
206 |
</span> |
206 |
<option value="0">All</option> |
207 |
|
207 |
<option value="1">1st</option> |
208 |
<span name="to_field_block" id="to_field_block" style="display:none;"> |
208 |
</select> |
209 |
to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" title="let blank for the entire field" /> |
209 |
</span> |
210 |
|
210 |
|
211 |
<span name="to_field_regex_block" id="to_field_regex_block"> |
211 |
field(s) <input type="text" name="from_field" id="from_field" size="3" maxlength="3" /> <input type="text" name="from_subfield" id="from_subfield" size="1" maxlength="1" title="let blank for the entire field" /> |
212 |
<sup> |
|
|
213 |
<label for="to_field_regex">RegEx</label> |
214 |
<input type="checkbox" name="to_field_regex" id="to_field_regex" onchange="onToFieldRegexChange(this);" /> |
215 |
|
212 |
|
216 |
<span name="to_field_regex_value_block" id="to_field_regex_value_block" style="display:none;"> |
213 |
<span name="with_value_block" id="with_value_block" style="display:none;"> |
217 |
s/<input type="text" name="to_regex_search" id="to_regex_search" placeholder="regex pattern" />/<input type="text" name="to_regex_replace" id="to_regex_replace" placeholder="regex replacement" />/<input type="text" name="to_regex_modifiers" id="to_regex_modifiers" placeholder="ig" size="3" /> |
214 |
with value <input type="text" name="field_value" id="field_value" /> |
218 |
</span> |
|
|
219 |
</sup> |
220 |
</span> |
215 |
</span> |
221 |
</span> |
|
|
222 |
|
216 |
|
223 |
<br><br> |
217 |
<span name="to_field_block" id="to_field_block" style="display:none;"> |
|
|
218 |
to field <input type="text" name="to_field" id="to_field" size="3" maxlength="3" /> <input type="text" name="to_subfield" id="to_subfield" size="1" maxlength="1" title="let blank for the entire field" /> |
224 |
|
219 |
|
225 |
<select name="conditional" id="conditional" onchange="onConditionalChange(this);"> |
220 |
<span name="to_field_regex_block" id="to_field_regex_block"> |
226 |
<option value="" selected="selected" /> |
221 |
<sup> |
227 |
<option value="if">if</option> |
222 |
<label for="to_field_regex">RegEx</label> |
228 |
<option value="unless">unless</option> |
223 |
<input type="checkbox" name="to_field_regex" id="to_field_regex" onchange="onToFieldRegexChange(this);" /> |
229 |
</select> |
|
|
230 |
|
224 |
|
231 |
<span name="conditional_block" id="conditional_block" style="display:none;"> |
225 |
<span name="to_field_regex_value_block" id="to_field_regex_value_block" style="display:none;"> |
232 |
field <input type="text" name="conditional_field" id="conditional_field" size="3" maxlength="3" /> <input type="text" name="conditional_subfield" id="conditional_subfield" size="1" maxlength="1" /> |
226 |
s/<input type="text" name="to_regex_search" id="to_regex_search" placeholder="regex pattern" />/<input type="text" name="to_regex_replace" id="to_regex_replace" placeholder="regex replacement" />/<input type="text" name="to_regex_modifiers" id="to_regex_modifiers" placeholder="ig" size="3" /> |
|
|
227 |
</span> |
228 |
</sup> |
229 |
</span> |
230 |
</span> |
231 |
</div> |
233 |
|
232 |
|
234 |
<select name="conditional_comparison" id="conditional_comparison" onchange="onConditionalComparisonChange(this);"> |
233 |
<div class="action_line"> |
235 |
<option value="" /> |
234 |
<select name="conditional" id="conditional" onchange="onConditionalChange(this);"> |
236 |
<option value="exists">exists</option> |
235 |
<option value="" selected="selected" /> |
237 |
<option value="not_exists">doesn't exist</option> |
236 |
<option value="if">if</option> |
238 |
<option value="equals">matches</option> |
237 |
<option value="unless">unless</option> |
239 |
<option value="not_equals">doesn't match</option> |
|
|
240 |
</select> |
238 |
</select> |
241 |
|
239 |
|
242 |
<span name="conditional_comparison_block" id="conditional_comparison_block" style="display:none;"> |
240 |
<span name="conditional_block" id="conditional_block" style="display:none;"> |
243 |
|
241 |
field <input type="text" name="conditional_field" id="conditional_field" size="3" maxlength="3" /> <input type="text" name="conditional_subfield" id="conditional_subfield" size="1" maxlength="1" /> |
244 |
<span class="match_regex_prefix">m/</span><input type="text" id="conditional_value" name="conditional_value" /><span class="match_regex_suffix">/</span> |
|
|
245 |
|
242 |
|
246 |
<sup> |
243 |
<select name="conditional_comparison" id="conditional_comparison" onchange="onConditionalComparisonChange(this);"> |
247 |
<label for="conditional_regex">RegEx</label> |
244 |
<option value="" /> |
248 |
<input type="checkbox" name="conditional_regex" id="conditional_regex" onchange="onConditionalRegexChange(this);" /> |
245 |
<option value="exists">exists</option> |
249 |
</sup> |
246 |
<option value="not_exists">doesn't exist</option> |
|
|
247 |
<option value="equals">matches</option> |
248 |
<option value="not_equals">doesn't match</option> |
249 |
</select> |
250 |
|
250 |
|
251 |
</span> |
251 |
<span name="conditional_comparison_block" id="conditional_comparison_block" style="display:none;"> |
252 |
</span> |
|
|
253 |
|
252 |
|
254 |
<input type="hidden" name="template_id" value="[% template_id | html %]" /> |
253 |
<span class="match_regex_prefix">m/</span><input type="text" id="conditional_value" name="conditional_value" /><span class="match_regex_suffix">/</span> |
255 |
<input type="hidden" name="mmta_id" id="mmta_id" /> |
|
|
256 |
<input type="hidden" name="op" value="add_action" /> |
257 |
|
254 |
|
258 |
<br/><br/> |
255 |
<sup> |
259 |
<label for="description">Description:</label> |
256 |
<label for="conditional_regex">RegEx</label> |
260 |
<input type="text" name="description" id="description" size="60" /> |
257 |
<input type="checkbox" name="conditional_regex" id="conditional_regex" onchange="onConditionalRegexChange(this);" /> |
|
|
258 |
</sup> |
261 |
|
259 |
|
262 |
<br/><br/> |
260 |
</span> |
263 |
<input id="action_submit" type="submit" value="Add action" /> <a href="#modaction" id="cancel_edit" onclick="cancelEditAction();">Cancel</a> |
261 |
</span> |
|
|
262 |
</div> |
263 |
|
264 |
<div class="action_line"> |
265 |
<label for="description">Description:</label> |
266 |
<input type="text" name="description" id="description" size="60" /> |
267 |
</div> |
268 |
|
269 |
<fieldset class="action"> |
270 |
<input type="hidden" name="template_id" value="[% template_id | html %]" /> |
271 |
<input type="hidden" name="mmta_id" id="mmta_id" /> |
272 |
<input type="hidden" name="op" value="add_action" /> |
273 |
<input id="action_submit" type="submit" value="Add action" /> |
274 |
<a href="#modaction" class="cancel" id="cancel_edit" onclick="cancelEditAction();">Cancel</a> |
275 |
</fieldset> |
264 |
|
276 |
|
265 |
</fieldset> |
277 |
</fieldset> |
266 |
</form> |
278 |
</form> |
267 |
- |
|
|