Lines 153-160
Link Here
|
153 |
<legend>MARC modification template</legend> |
153 |
<legend>MARC modification template</legend> |
154 |
<ol> |
154 |
<ol> |
155 |
<li> |
155 |
<li> |
156 |
<label for="marc_modification_template_id" class="required">Template: </label> |
156 |
<label for="marc_modification_template_id">Template: </label> |
157 |
<select name="marc_modification_template_id" id="marc_modification_template_id" required="required"> |
157 |
<select name="marc_modification_template_id" id="marc_modification_template_id"> |
158 |
<option value="">Select a template</option> |
158 |
<option value="">Select a template</option> |
159 |
[% FOREACH mmt IN MarcModificationTemplatesLoop %] |
159 |
[% FOREACH mmt IN MarcModificationTemplatesLoop %] |
160 |
<option value="[% mmt.template_id | html %]">[% mmt.name | html %]</option> |
160 |
<option value="[% mmt.template_id | html %]">[% mmt.name | html %]</option> |
Lines 163-168
Link Here
|
163 |
</li> |
163 |
</li> |
164 |
</ol> |
164 |
</ol> |
165 |
</fieldset> |
165 |
</fieldset> |
|
|
166 |
<fieldset class="rows frameworkcode"> |
167 |
<legend>Update framework</legend> |
168 |
<ol> |
169 |
<li> |
170 |
<label for="overlay_framework">Update framework: </label> |
171 |
<select name="overlay_framework" id="overlay_framework"> |
172 |
<option value="_USE_ORIG_">Keep original framework</option> |
173 |
<option value="">Default</option> |
174 |
[% FOREACH framework IN frameworks %] |
175 |
<option value="[% framework.frameworkcode | html %]">[% framework.frameworktext | html %]</option> |
176 |
[% END %] |
177 |
</select> |
178 |
</li> |
179 |
</ol> |
180 |
</fieldset> |
166 |
<fieldset class="action"> |
181 |
<fieldset class="action"> |
167 |
<input type="hidden" name="op" value="cud-list" /> |
182 |
<input type="hidden" name="op" value="cud-list" /> |
168 |
<input type="submit" class="btn btn-primary" value="Continue" /> |
183 |
<input type="submit" class="btn btn-primary" value="Continue" /> |
Lines 174-181
Link Here
|
174 |
[% IF records %] |
189 |
[% IF records %] |
175 |
<form action="/cgi-bin/koha/tools/batch_record_modification.pl" method="post"> |
190 |
<form action="/cgi-bin/koha/tools/batch_record_modification.pl" method="post"> |
176 |
[% INCLUDE 'csrf-token.inc' %] |
191 |
[% INCLUDE 'csrf-token.inc' %] |
177 |
<label for="marc_modification_template_id" class="required">Modify record using the following template: </label> |
192 |
<label for="marc_modification_template_id">Modify record using the following template: </label> |
178 |
<select name="marc_modification_template_id" id="marc_modification_template_id" required="required"> |
193 |
<select name="marc_modification_template_id" id="marc_modification_template_id"> |
179 |
<option value="">Select a template</option> |
194 |
<option value="">Select a template</option> |
180 |
[% FOREACH mmt IN MarcModificationTemplatesLoop %] |
195 |
[% FOREACH mmt IN MarcModificationTemplatesLoop %] |
181 |
[% IF mmt.selected %] |
196 |
[% IF mmt.selected %] |
Lines 202-207
Link Here
|
202 |
</div> |
217 |
</div> |
203 |
</div> |
218 |
</div> |
204 |
[% IF recordtype == 'biblio' %] |
219 |
[% IF recordtype == 'biblio' %] |
|
|
220 |
<label for="update_framework">Update framework: </label> |
221 |
<select name="overlay_framework" id="overlay_framework"> |
222 |
<option value="_USE_ORIG_" [% IF frameworkcode == "_USE_ORIG" %]selected="selected"[% END %]>Keep original framework</option> |
223 |
<option value="" [% IF frameworkcode == "" %]selected="selected"[% END %]>Default</option> |
224 |
[%- FOREACH framework IN frameworks -%] |
225 |
[%- IF framework.frameworkcode == frameworkcode -%] |
226 |
<option value="[% framework.frameworkcode | html %]" selected="selected">[% framework.frameworktext | html %]</option> |
227 |
[%- ELSE -%] |
228 |
<option value="[% framework.frameworkcode | html %]">[% framework.frameworktext | html %]</option> |
229 |
[%- END -%] |
230 |
[%- END -%] |
231 |
</select> |
205 |
<div class="btn-toolbar selections-toolbar"> |
232 |
<div class="btn-toolbar selections-toolbar"> |
206 |
<a id="selectall" href="#"><i class="fa fa-check"></i> Select all</a> |
233 |
<a id="selectall" href="#"><i class="fa fa-check"></i> Select all</a> |
207 |
| <a id="clearall" href="#"><i class="fa fa-times"></i> Clear all</a> |
234 |
| <a id="clearall" href="#"><i class="fa fa-times"></i> Clear all</a> |
Lines 325-333
Link Here
|
325 |
if (selected_type == 'authority') { |
352 |
if (selected_type == 'authority') { |
326 |
$("a[href='#shelves_tab_panel']").parent().hide(); |
353 |
$("a[href='#shelves_tab_panel']").parent().hide(); |
327 |
$("a[href='#uploadfile_tab_panel']").tab("show"); |
354 |
$("a[href='#uploadfile_tab_panel']").tab("show"); |
|
|
355 |
$("fieldset.frameworkcode").hide(); |
328 |
} else if (selected_type == 'biblio') { |
356 |
} else if (selected_type == 'biblio') { |
329 |
$("a[href='#shelves_tab_panel']").parent().show(); |
357 |
$("a[href='#shelves_tab_panel']").parent().show(); |
330 |
$("a[href='#uploadfile_tab_panel']").tab("show"); |
358 |
$("a[href='#uploadfile_tab_panel']").tab("show"); |
|
|
359 |
$("fieldset.frameworkcode").show(); |
331 |
} |
360 |
} |
332 |
} |
361 |
} |
333 |
$(document).ready(function() { |
362 |
$(document).ready(function() { |
Lines 373-390
Link Here
|
373 |
paginate: false, |
402 |
paginate: false, |
374 |
}); |
403 |
}); |
375 |
|
404 |
|
376 |
$("#mainformsubmit").click(function() { |
|
|
377 |
if ($("input[type=checkbox][name='record_id']:checked").length == 0) { |
378 |
alert(_("Please select at least one record to process")); |
379 |
return false; |
380 |
} |
381 |
if ($("#marc_modification_template_id").val() <= 0) { |
382 |
alert(_("Please select a modification template.")); |
383 |
return false; |
384 |
} |
385 |
return true; |
386 |
}); |
387 |
|
388 |
$("#record_ids_selection").on("submit", function(e) { |
405 |
$("#record_ids_selection").on("submit", function(e) { |
389 |
var tab = $(this).find('#batch_mod_form li a.active:first').attr('href'); |
406 |
var tab = $(this).find('#batch_mod_form li a.active:first').attr('href'); |
390 |
if (tab == '#uploadfile_tab_panel') { |
407 |
if (tab == '#uploadfile_tab_panel') { |