4e0b5d021c17c2335598432a0ed1752da756c337
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / cataloguing / value_builder / unimarc_field_146a.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Framework plugin unimarc_field_146a &rsaquo; Cataloguing &rsaquo; Koha</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 </head>
5
6 <body id="unimarc_field_146a" class="cat">
7     <div class="container-fluid">
8         <h1>Framework plugin for UNIMARC 146$a</h1>
9
10         <form class="form-horizontal" id="form">
11             <input type="hidden" id="id" name="id" value="[% id | html %]">
12
13             <div class="form-group">
14                 <label for="type" class="col-sm-2 control-label">Type of Performance Medium</label>
15                 <div class="col-sm-10">
16                     <select class="form-control" id="type">
17                         [% FOREACH option IN options %]
18                             [% IF option.value == value %]
19                                 <option value="[% option.value | html %]" selected>[% option.label | html %]</option>
20                             [% ELSE %]
21                                 <option value="[% option.value | html %]">[% option.label | html %]</option>
22                             [% END %]
23                         [% END %]
24                     </select>
25                 </div>
26             </div>
27
28             <div class="form-group">
29                 <div class="col-sm-offset-2 col-sm-10">
30                     <button type="submit">OK</button>
31                     <a href="#" class="cancel close">Cancel</a>
32                 </div>
33             </div>
34         </form>
35     </div>
36
37     <script>
38         document.getElementById('form').addEventListener('submit', function (ev) {
39             ev.preventDefault();
40             const id = document.getElementById('id').value;
41             const type = document.getElementById('type').value;
42             opener.document.getElementById(id).value = type;
43             window.close();
44         });
45     </script>
46
47 [% INCLUDE 'popup-bottom.inc' %]