Browse Source

Autoselect marcflavour in marc import

This patch is writted by Paul Poulain.
It auto-select the marcflavour from syspref in the stage marc import.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
3.2.x
Nahuel ANGELINETTI 16 years ago
committed by Galen Charlton
parent
commit
734cf78be6
  1. 6
      koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tmpl
  2. 3
      tools/stage-marc-import.pl

6
koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tmpl

@ -97,7 +97,11 @@ function CheckForm(f) {
</li>
<li>
<label for="syntax">Character encoding: </label>
<select name="syntax" id="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC">UNIMARC</option></select>
<!-- TMPL_IF name="UNIMARC" -->
<select name="syntax" id="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC" selected="1">UNIMARC</option></select>
<!-- TMPL_ELSE -->
<select name="syntax" id="syntax"><option value="MARC21" selected="1">MARC21</option><option value="UNIMARC">UNIMARC</option></select>
<!-- /TMPL_IF -->
</li>
</ol></fieldset>

3
tools/stage-marc-import.pl

@ -183,6 +183,9 @@ if ($completedJobID) {
} else {
# initial form
if (C4::Context->preference("marcflavour") eq "UNIMARC") {
$template->param("UNIMARC" => 1);
}
my @matchers = C4::Matcher::GetMatcherList();
$template->param(available_matchers => \@matchers);
}

Loading…
Cancel
Save