1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Serials › Select Supplier</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <!--TMPL_INCLUDE NAME="menu-serials.inc" -->
6 <h1>Select borrowers or enter manually the names</h1>
8 <form action="/cgi-bin/koha/serials/distributedto.pl" method="post" name="Aform">
12 <input type="text" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->">
13 <input type="submit" class="button" value="Filter">
16 <h2>Distributed to</h2>
18 <textarea name="distributedto" rows="15" cols="30"><!-- TMPL_VAR name="distributedto" --></textarea>
21 <!-- TMPL_IF name="save" -->
24 <input type="hidden" name="SaveList" value="0">
25 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
26 <input type="button" name="save" value="Save" class="button" onClick="FSaveList()">
27 <input type="button" name="clode" value="Close" class="button" onClick="javascript:window.close()">
32 <!-- TMPL_VAR NAME="borrowername" -->
33 <select name="borlist" size="15">
34 <!-- TMPL_LOOP name="borlist" -->
35 <option value="<!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" -->">
36 <!-- TMPL_VAR name="surname" --> <!-- TMPL_VAR name="firstname" -->
40 <input type="button" name="insert" value=">>" class="button" onclick="insertValueQuery()" title="Insert" />
46 <script language="javascript" type="text/javascript">
47 // GPL code coming from PhpMyAdmin
48 function insertValueQuery() {
49 var myQuery = document.Aform.distributedto;
50 var myListBox = document.Aform.borlist;
52 if(myListBox.options.length > 0) {
55 for(var i=0; i<myListBox.options.length; i++) {
56 if (myListBox.options[i].selected){
60 chaineAj += myListBox.options[i].value;
65 if (document.selection) {
67 sel = document.selection.createRange();
69 document.Aform.insert.focus();
71 //MOZILLA/NETSCAPE support
72 else if (document.Aform.distributedto.selectionStart || document.Aform.distributedto.selectionStart == "0") {
73 var startPos = document.Aform.distributedto.selectionStart;
74 var endPos = document.Aform.distributedto.selectionEnd;
75 var chaineSql = document.Aform.distributedto.value;
76 myQuery.value = chaineSql.substring(0, startPos) +''+ chaineAj+"\n" + chaineSql.substring(endPos, chaineSql.length);
78 myQuery.value += chaineAj;
82 function FSaveList() {
83 document.Aform.SaveList.value=1;
84 document.Aform.submit();
88 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->