}
);
$result = "a|||||r|||| 00| 0 " unless $result;
+ my $material_form_mapping = {
+ a => 'BKS', t => 'BKS',
+ c => 'MU', d => 'MU', i => 'MU', j => 'MU',
+ e => 'MP', f => 'MP',
+ g => 'VM', k => 'VM', o => 'VM', r => 'VM',
+ m => 'CF',
+ p => 'MX',
+ s => 'CR',
+ };
+ my $material_code = substr(($result // ' '), 0, 1);
+ my $material_configuration = $material_form_mapping->{$material_code};
my $errorXml = '';
# Check if the xml, xsd exists and is validated
index => $index,
result => $result,
errorXml => $errorXml,
+ material_configuration => $material_configuration,
);
output_html_with_http_headers $input, $cookie, $template->output;
};
-return { builder => $builder, launcher => $launcher };
\ No newline at end of file
+return { builder => $builder, launcher => $launcher };
h4_result = document.getElementById("h4_result");
tr_result = document.getElementById("tr_result");
objXmlControlField = new xmlControlField('[% tagfield %]', 'f_pop', document.getElementById('material_type'), document.getElementById('table_material_types'), 'h4_result', 'tr_result', '', '[% themelang %]', '[% marcflavour %]');
+ [% IF ( material_configuration ) %]
+ objXmlControlField.idMaterial = "[% material_configuration %]";
+ [% END %]
objXmlControlField.loadXmlValues();
renderResult(tr_result, (form.result.value != "")?form.result.value:returnValueParam("result"));
[% END %]