Cleanup on Serials. Markup corrections and cleanup, moving script blocks into header...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / distributedto.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Serials &rsaquo; Select Supplier</title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script language="javascript" type="text/javascript">
5                 // GPL code coming from PhpMyAdmin
6                 function insertValueQuery() {
7                         var myQuery = document.Aform.distributedto;
8                         var myListBox = document.Aform.borlist;
9                 
10                         if(myListBox.options.length > 0) {
11                                 var chaineAj = "";
12                                 var NbSelect = 0;
13                                 for(var i=0; i<myListBox.options.length; i++) {
14                                         if (myListBox.options[i].selected){
15                                                 NbSelect++;
16                                                 if (NbSelect > 1)
17                                                         chaineAj += ", ";
18                                                 chaineAj += myListBox.options[i].value;
19                                         }
20                                 }
21                 
22                                 //IE support
23                                 if (document.selection) {
24                                         myQuery.focus();
25                                         sel = document.selection.createRange();
26                                         sel.text = chaineAj;
27                                         document.Aform.insert.focus();
28                                 }
29                                 //MOZILLA/NETSCAPE support
30                                 else if (document.Aform.distributedto.selectionStart || document.Aform.distributedto.selectionStart == "0") {
31                                         var startPos = document.Aform.distributedto.selectionStart;
32                                         var endPos = document.Aform.distributedto.selectionEnd;
33                                         var chaineSql = document.Aform.distributedto.value;
34                                         myQuery.value = chaineSql.substring(0, startPos) +''+ chaineAj+"\n" + chaineSql.substring(endPos, chaineSql.length);
35                                 } else {
36                                         myQuery.value += chaineAj;
37                                 }
38                         }
39                 }
40                 function FSaveList() {
41                         document.Aform.SaveList.value="1";
42                         document.Aform.submit();
43                 }
44         </script>
45 </head>
46 <body>
47 <!-- TMPL_INCLUDE NAME="header.inc" -->
48 <!--TMPL_INCLUDE NAME="menu-serials.inc" -->
49
50 <div id="doc3" class="yui-t2">
51    
52    <div id="bd">
53         <div id="yui-main">
54         <div class="yui-b"><div class="yui-g">
55
56         <h1>Select borrowers or enter manually the names</h1>
57         <p>
58                 <form action="/cgi-bin/koha/serials/distributedto.pl" method="post" name="Aform">
59                         <table>
60                         <tr>
61                         <td>
62                                 <input type="text" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->" />
63                                 <input type="submit" class="button" value="Filter" />
64                         </td>
65                         <td rowspan="2">
66                                 <h2>Distributed to</h2>
67                                 <p>
68                                         <textarea name="distributedto" rows="15" cols="30"><!-- TMPL_VAR name="distributedto" --></textarea>
69                                 </p>
70                                 <p>
71                                         <!-- TMPL_IF name="save" -->
72                                                 saved</p>
73                                         <!-- /TMPL_IF -->
74                                         <input type="hidden" name="SaveList" value="0" />
75                                         <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
76                                         <input type="button" name="save" value="Save" class="button" onclick="FSaveList()" />
77                                         <input type="button" name="clode" value="Close" class="button" onclick="window.close()" />
78                         </td>
79                         </tr>
80                         <tr>
81                         <td>
82                                 <!-- TMPL_VAR NAME="borrowername" -->
83                                 <select name="borlist" size="15">
84                                         <!-- TMPL_LOOP name="borlist" -->
85                                                 <option value="<!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" -->">
86                                                         <!-- TMPL_VAR name="surname" --> <!-- TMPL_VAR name="firstname" -->
87                                                 </option>
88                                         <!-- /TMPL_LOOP -->
89                                 </select>
90                                 <input type="button" name="insert" value="&gt;&gt;" class="button" onclick="insertValueQuery()" title="Insert" />
91                         </td>
92                         </tr>
93                         </table>
94                 </form>
95         </p>
96         
97 </div>
98 </div>
99 </div>
100
101 <!-- TMPL_INCLUDE NAME="mainmenu.inc" -->
102 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
103