1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Framework plugin unimarc_field_146h › Cataloguing › Koha</title>
3 [% INCLUDE 'doc-head-close.inc' %]
6 <body id="unimarc_field_146h" class="cat">
7 <div class="container-fluid">
8 <h1>Framework plugin for UNIMARC 146$h</h1>
10 <div class="page-section">
11 <form class="form-horizontal" id="form">
12 <input type="hidden" id="id" name="id" value="[% id | html %]">
14 <div class="form-group">
15 <label for="number" class="col-sm-2 control-label">Number of parts</label>
16 <div class="col-sm-10">
17 <input type="text" inputmode="numeric" pattern="[0-9]{1,3}" id="number" name="number" title="a number between 0 and 999 (inclusive)" value="[% number | html %]">
18 <p class="help-block">
19 A number between 0 and 999 (inclusive)
23 <div class="form-group">
24 <label for="category" class="col-sm-2 control-label">Category</label>
25 <div class="col-sm-10">
26 <select class="form-control" id="category">
27 [% FOREACH option IN options %]
28 [% IF option.value == category %]
29 <option value="[% option.value | html %]" selected>[% option.label | html %]</option>
31 <option value="[% option.value | html %]">[% option.label | html %]</option>
38 <div class="form-group">
39 <div class="col-sm-offset-2 col-sm-10">
40 <button type="submit" class="btn btn-primary">OK</button>
41 <a href="#" class="cancel close">Cancel</a>
45 </div> <!-- /.page-section -->
49 document.getElementById('form').addEventListener('submit', function (ev) {
51 const id = document.getElementById('id').value;
52 const number = document.getElementById('number').value;
53 const category = document.getElementById('category').value;
54 const value = number.toString().padStart(3, '0') + category;
55 opener.document.getElementById(id).value = value;
60 [% INCLUDE 'popup-bottom.inc' %]