View | Details | Raw Unified | Return to bug 13912
Collapse All | Expand All

(-)a/cataloguing/value_builder/marc21_field_008.pl (-3 / +9 lines)
Lines 50-55 sub plugin_javascript { Link Here
50
    my $lang = C4::Context->preference('DefaultLanguageField008' );
50
    my $lang = C4::Context->preference('DefaultLanguageField008' );
51
    $lang = "eng" unless $lang;
51
    $lang = "eng" unless $lang;
52
    $lang = pack("A3", $lang);
52
    $lang = pack("A3", $lang);
53
    my $country = C4::Context->preference('DefaultCountryField008');
54
    $country = "xxu" unless $country;
55
    $country = pack("A3", $country);
53
56
54
    my ($dbh, $record, $tagslib, $field_number, $tabloop) = @_;
57
    my ($dbh, $record, $tagslib, $field_number, $tabloop) = @_;
55
    my $function_name = $field_number;
58
    my $function_name = $field_number;
Lines 61-67 function Focus$function_name(subfield_managed) { Link Here
61
	if ( document.getElementById(\"$field_number\").value ) {
64
	if ( document.getElementById(\"$field_number\").value ) {
62
	}
65
	}
63
	else {
66
	else {
64
        document.getElementById(\"$field_number\").value='$dateentered' + 'b        xxu||||| |||| 00| 0 $lang d';
67
        document.getElementById(\"$field_number\").value='$dateentered' + 'b        $country||||| |||| 00| 0 $lang d';
65
	}
68
	}
66
    return 1;
69
    return 1;
67
}
70
}
Lines 93-99 sub plugin { Link Here
93
    my $lang = C4::Context->preference('DefaultLanguageField008' );
96
    my $lang = C4::Context->preference('DefaultLanguageField008' );
94
    $lang = "eng" unless $lang;
97
    $lang = "eng" unless $lang;
95
    $lang = pack("A3", $lang);
98
    $lang = pack("A3", $lang);
96
99
    my $country = C4::Context->preference('DefaultCountryField008');
100
    $country = "xxu" unless $country;
101
    $country = pack("A3", $country);
102
    
97
    my ($input) = @_;
103
    my ($input) = @_;
98
    my $index   = $input->param('index');
104
    my $index   = $input->param('index');
99
    my $result  = $input->param('result');
105
    my $result  = $input->param('result');
Lines 158-164 sub plugin { Link Here
158
        }
164
        }
159
    );
165
    );
160
166
161
    $result = "$dateentered" . "b        xxu||||| |||| 00| 0 $lang d" unless $result;
167
    $result = "$dateentered" . "b        $country||||| |||| 00| 0 $lang d" unless $result;
162
    my $errorXml = '';
168
    my $errorXml = '';
163
    # Check if the xml, xsd exists and is validated
169
    # Check if the xml, xsd exists and is validated
164
    my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/';
170
    my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/';
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 96-101 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
96
('decreaseLoanHighHoldsDuration',NULL,'','Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds','Integer'),
96
('decreaseLoanHighHoldsDuration',NULL,'','Specifies a number of days that a loan is reduced to when used in conjunction with decreaseLoanHighHolds','Integer'),
97
('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'),
97
('decreaseLoanHighHoldsValue',NULL,'','Specifies a threshold for the minimum number of holds needed to trigger a reduction in loan duration (used with decreaseLoanHighHolds)','Integer'),
98
('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'),
98
('DefaultClassificationSource','ddc',NULL,'Default classification scheme used by the collection. E.g., Dewey, LCC, etc.','ClassSources'),
99
('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free'),
99
('DefaultLanguageField008','','','Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see <a href=\"http://www.loc.gov/marc/languages/language_code.html\">MARC Code List for Languages</a>)','Free'),
100
('DefaultLanguageField008','','','Fill in the default language for field 008 Range 35-37 of MARC21 records (e.g. eng, nor, ger, see <a href=\"http://www.loc.gov/marc/languages/language_code.html\">MARC Code List for Languages</a>)','Free'),
100
('DefaultLongOverdueChargeValue', NULL, NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'),
101
('DefaultLongOverdueChargeValue', NULL, NULL, "Charge a lost item to the borrower's account when the LOST value of the item changes to n.", 'integer'),
101
('DefaultLongOverdueDays', NULL, NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'),
102
('DefaultLongOverdueDays', NULL, NULL, "Set the LOST value of an item when the item has been overdue for more than n days.", 'integer'),
(-)a/installer/data/mysql/updatedatabase.pl (+9 lines)
Lines 9867-9872 if(CheckVersion($DBversion)) { Link Here
9867
    SetVersion($DBversion);
9867
    SetVersion($DBversion);
9868
}
9868
}
9869
9869
9870
$DBversion = "3.19.00.XXX";
9871
if ( CheckVersion($DBversion) ) {
9872
    $dbh->do("INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('DefaultCountryField008','','','Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href=\"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>','Free')");
9873
    print "Upgrade to $DBversion done (Bug 13912: System preference for default place of publication (country code) for field 008, range 15-17)\n";
9874
    SetVersion($DBversion);
9875
}
9876
9877
9878
9870
=head1 FUNCTIONS
9879
=head1 FUNCTIONS
9871
9880
9872
=head2 TableExists($table)
9881
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +4 lines)
Lines 44-49 Cataloging: Link Here
44
            - pref: DefaultLanguageField008
44
            - pref: DefaultLanguageField008
45
            - " Empty defaults to eng."
45
            - " Empty defaults to eng."
46
        -
46
        -
47
            - Fill in the default country code for field 008 Range 15-17 - Place of publication, production, or execution. See <a href"http://www.loc.gov/marc/countries/countries_code.html\">MARC Code List for Countries</a>
48
            - pref: DefaultCountryField008
49
            - " Empty defaults to xxu for United States."
50
        -
47
            - Interpret and store MARC records in the
51
            - Interpret and store MARC records in the
48
            - pref: marcflavour
52
            - pref: marcflavour
49
              choices:
53
              choices:
50
- 

Return to bug 13912