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