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

(-)a/cataloguing/value_builder/marc21_field_006.pl (-1 / +13 lines)
Lines 66-71 my $launcher = sub { Link Here
66
        }
66
        }
67
    );
67
    );
68
    $result = "a|||||r|||| 00| 0 " unless $result;
68
    $result = "a|||||r|||| 00| 0 " unless $result;
69
    my $material_form_mapping = {
70
        a => 'BKS', t => 'BKS',
71
        c => 'MU', d => 'MU', i => 'MU', j => 'MU',
72
        e => 'MP', f => 'MP',
73
        g => 'VM', k => 'VM', o => 'VM', r => 'VM',
74
        m => 'CF',
75
        p => 'MX',
76
        s => 'CR',
77
    };
78
    my $material_code = substr(($result // ' '), 0, 1);
79
    my $material_configuration = $material_form_mapping->{$material_code};
69
80
70
    my $errorXml = '';
81
    my $errorXml = '';
71
    # Check if the xml, xsd exists and is validated
82
    # Check if the xml, xsd exists and is validated
Lines 86-93 my $launcher = sub { Link Here
86
            index => $index,
97
            index => $index,
87
            result => $result,
98
            result => $result,
88
            errorXml => $errorXml,
99
            errorXml => $errorXml,
100
            material_configuration => $material_configuration,
89
    );
101
    );
90
    output_html_with_http_headers $input, $cookie, $template->output;
102
    output_html_with_http_headers $input, $cookie, $template->output;
91
};
103
};
92
104
93
return { builder => $builder, launcher => $launcher };
105
return { builder => $builder, launcher => $launcher };
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.tt (-1 / +3 lines)
Lines 17-22 Link Here
17
        h4_result = document.getElementById("h4_result");
17
        h4_result = document.getElementById("h4_result");
18
        tr_result = document.getElementById("tr_result");
18
        tr_result = document.getElementById("tr_result");
19
        objXmlControlField = new xmlControlField('[% tagfield %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', '', '[% themelang %]', '[% marcflavour %]');
19
        objXmlControlField = new xmlControlField('[% tagfield %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', '', '[% themelang %]', '[% marcflavour %]');
20
        [% IF ( material_configuration ) %]
21
        objXmlControlField.idMaterial = "[% material_configuration %]";
22
        [% END %]
20
        objXmlControlField.loadXmlValues();
23
        objXmlControlField.loadXmlValues();
21
        renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result"));
24
        renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result"));
22
        [% END %]
25
        [% END %]
23
- 

Return to bug 17072