1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Select supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <h1>Select borrowers or enter manually the names</h1>
6 <form action="/cgi-bin/koha/serials/distributedto.pl" method="post" name="Aform">
10 <input type="text" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->">
11 <input type="submit" class="button" value="Filter">
14 <h2>Distributed to</h2>
16 <textarea name="distributedto" rows="15" cols="30"><!-- TMPL_VAR name="distributedto" --></textarea>
19 <!-- TMPL_IF name="save" -->
22 <input type="hidden" name="SaveList" value="0">
23 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
24 <input type="button" name="save" value="Save" class="button" onClick="FSaveList()">
25 <input type="button" name="clode" value="Close" class="button" onClick="javascript:window.close()">
30 <!-- TMPL_VAR NAME="borrowername" -->
31 <select name="borlist" size="15">
32 <!-- TMPL_LOOP name="borlist" -->
33 <option value="<!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" -->">
34 <!-- TMPL_VAR name="surname" --> <!-- TMPL_VAR name="firstname" -->
38 <input type="button" name="insert" value=">>" class="button" onclick="insertValueQuery()" title="Insert" />
44 <script language="javascript" type="text/javascript">
45 // GPL code coming from PhpMyAdmin
46 function insertValueQuery() {
47 var myQuery = document.Aform.distributedto;
48 var myListBox = document.Aform.borlist;
50 if(myListBox.options.length > 0) {
53 for(var i=0; i<myListBox.options.length; i++) {
54 if (myListBox.options[i].selected){
58 chaineAj += myListBox.options[i].value;
63 if (document.selection) {
65 sel = document.selection.createRange();
67 document.Aform.insert.focus();
69 //MOZILLA/NETSCAPE support
70 else if (document.Aform.distributedto.selectionStart || document.Aform.distributedto.selectionStart == "0") {
71 var startPos = document.Aform.distributedto.selectionStart;
72 var endPos = document.Aform.distributedto.selectionEnd;
73 var chaineSql = document.Aform.distributedto.value;
74 myQuery.value = chaineSql.substring(0, startPos) +''+ chaineAj+"\n" + chaineSql.substring(endPos, chaineSql.length);
76 myQuery.value += chaineAj;
80 function FSaveList() {
81 document.Aform.SaveList.value=1;
82 document.Aform.submit();
86 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->