1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Select supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
2 <!-- TMPL_INCLUDE NAME="menus.inc" -->
3 <!-- TMPL_INCLUDE NAME="menu-serials.inc" -->
5 <h1>Select borrowers or enter manually the names</h1>
7 <form action="/cgi-bin/koha/serials/distributedto.pl" method="post" name="Aform">
11 <input type="text" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->">
12 <input type="submit" class="button" value="Filter">
15 <h2>Distributed to</h2>
17 <textarea name="distributedto" rows="15" cols="30"><!-- TMPL_VAR name="distributedto" --></textarea>
20 <!-- TMPL_IF name="save" -->
23 <input type="hidden" name="SaveList" value="0">
24 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
25 <input type="button" name="save" value="Save" class="button" onClick="FSaveList()">
26 <input type="button" name="clode" value="Close" class="button" onClick="javascript:window.close()">
31 <!-- TMPL_VAR NAME="borrowername" -->
32 <select name="borlist" size="15">
33 <!-- TMPL_LOOP name="borlist" -->
34 <option value="<!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" -->">
35 <!-- TMPL_VAR name="surname" --> <!-- TMPL_VAR name="firstname" -->
39 <input type="button" name="insert" value=">>" class="button" onclick="insertValueQuery()" title="Insert" />
45 <script language="javascript" type="text/javascript">
46 // GPL code coming from PhpMyAdmin
47 function insertValueQuery() {
48 var myQuery = document.Aform.distributedto;
49 var myListBox = document.Aform.borlist;
51 if(myListBox.options.length > 0) {
54 for(var i=0; i<myListBox.options.length; i++) {
55 if (myListBox.options[i].selected){
59 chaineAj += myListBox.options[i].value;
64 if (document.selection) {
66 sel = document.selection.createRange();
68 document.Aform.insert.focus();
70 //MOZILLA/NETSCAPE support
71 else if (document.Aform.distributedto.selectionStart || document.Aform.distributedto.selectionStart == "0") {
72 var startPos = document.Aform.distributedto.selectionStart;
73 var endPos = document.Aform.distributedto.selectionEnd;
74 var chaineSql = document.Aform.distributedto.value;
75 myQuery.value = chaineSql.substring(0, startPos) +''+ chaineAj+"\n" + chaineSql.substring(endPos, chaineSql.length);
77 myQuery.value += chaineAj;
81 function FSaveList() {
82 document.Aform.SaveList.value=1;
83 document.Aform.submit();
87 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->