c09409e2af2298263f3ac81c2524f04ab52b09c7
[koha_fer] / koha-tmpl / intranet-tmpl / default / en / bull / subscription-add.tmpl
1 <!-- TMPL_INCLUDE NAME="bull-top.inc" -->
2 <!--------------------------MAIN BODY OF PAGE-------------------------->
3 <div id="mainbloc">
4 <!-- TMPL_IF name="mod" -->
5         <h1 class="bull">Modify subscription</h1>
6         <form method="post" name="f" action="subscription-detail.pl">
7                 <input type="hidden" name="op" value="modsubscription">
8                 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
9 <!-- TMPL_ELSE -->
10         <h1 class="bull">Add a subscription</h1>
11         <form method="post" name="f">
12 <!-- /TMPL_IF -->
13 <div id="bloc25">
14         <h2 class="bull">Subscription information</h2>
15                 <input type="hidden" name="op" value="addsubscription">
16                 <input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
17                 <p>Librarian</td><td> <!-- TMPL_VAR name="user" --></p>
18                 <p><label>Biblio</label><input type="text" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size=4> (<input type="text" name="title" value="<!-- TMPL_VAR name="title" -->" disabled readonly>)<a href="#" onClick="Plugin(f)">...</a></p>
19                 <p><label>Notes</label><TEXTAREA NAME="notes" COLS=30 ROWS=2><!-- TMPL_VAR name="notes" --></TEXTAREA></p>
20                 <p class="problem">warning</p>
21                 <ul>
22                         <li>remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
23                         <li>a suggestion is sent to the librarian. The suggestion will be changed to an order</li>
24                 </ul>
25 </div>
26 <div id="bloc25">
27         <h2 class="bull">Planning</h2>
28         <p><label class="label100">Beginnning date:</label> <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size=13 maxlength=10></p>
29         <p><label class="label100">Frequency (*)</label>
30                         <select name="periodicity" size="1">
31                                 <option value="" selected>Unknown</option>
32                                 <!-- TMPL_IF name="periodicity1" -->
33                                         <option value="1" selected>1/day</option>
34                                 <!-- TMPL_ELSE -->
35                                         <option value="1">1/day</option>
36                                 <!-- /TMPL_IF -->
37                                 <!-- TMPL_IF name="periodicity2" -->
38                                         <option value="2" selected>1/week</option>
39                                 <!-- TMPL_ELSE -->
40                                         <option value="2">1/week</option>
41                                 <!-- /TMPL_IF -->
42                                 <!-- TMPL_IF name="periodicity3" -->
43                                         <option value="3" selected>1/2 weeks</option>
44                                 <!-- TMPL_ELSE -->
45                                         <option value="3">1/2 weeks</option>
46                                 <!-- /TMPL_IF -->
47                                 <!-- TMPL_IF name="periodicity4" -->
48                                         <option value="4" selected>1/3 weeks</option>
49                                 <!-- TMPL_ELSE -->
50                                         <option value="4">1/3 weeks</option>
51                                 <!-- /TMPL_IF -->
52                                 <!-- TMPL_IF name="periodicity5" -->
53                                         <option value="5" selected>1/month</option>
54                                 <!-- TMPL_ELSE -->
55                                         <option value="5">1/month</option>
56                                 <!-- /TMPL_IF -->
57                                 <!-- TMPL_IF name="periodicity6" -->
58                                         <option value="6" selected>1/2 months</option>
59                                 <!-- TMPL_ELSE -->
60                                         <option value="6">1/2 months</option>
61                                 <!-- /TMPL_IF -->
62                                 <!-- TMPL_IF name="periodicity7" -->
63                                         <option value="7" selected>1/3 months</option>
64                                 <!-- TMPL_ELSE -->
65                                         <option value="7">1/3 months</option>
66                                 <!-- /TMPL_IF -->
67                                 <!-- TMPL_IF name="periodicity8" -->
68                                         <option value="8" selected>1/quarter</option>
69                                 <!-- TMPL_ELSE -->
70                                         <option value="8">1/quarter</option>
71                                 <!-- /TMPL_IF -->
72                                 <!-- TMPL_IF name="periodicity9" -->
73                                         <option value="9" selected>1/2 quarters</option>
74                                 <!-- TMPL_ELSE -->
75                                         <option value="9">1/2 quarters</option>
76                                 <!-- /TMPL_IF -->
77                                 <!-- TMPL_IF name="periodicity10" -->
78                                         <option value="10" selected>1/year</option>
79                                 <!-- TMPL_ELSE -->
80                                         <option value="10">1/year</option>
81                                 <!-- /TMPL_IF -->
82                                 <!-- TMPL_IF name="periodicity11" -->
83                                         <option value="11" selected>1/2 years</option>
84                                 <!-- TMPL_ELSE -->
85                                         <option value="11">1/2 years</option>
86                                 <!-- /TMPL_IF -->
87                         </select>
88         </p>
89         <p><label class="label100">Arrives on</label>
90                         <select name="dow" size="1">
91                                 <option value="">None</option>
92                                 <!-- TMPL_IF name="dow1" -->
93                                         <option value="1" selected>Monday</option>
94                                 <!-- TMPL_ELSE -->
95                                         <option value="1">Monday</option>
96                                 <!-- /TMPL_IF -->
97                                 <!-- TMPL_IF name="dow2" -->
98                                         <option value="2" selected>Tuesday</option>
99                                 <!-- TMPL_ELSE -->
100                                         <option value="2">Tuesday</option>
101                                 <!-- /TMPL_IF -->
102                                 <!-- TMPL_IF name="dow3" -->
103                                         <option value="3" selected>Wednesday</option>
104                                 <!-- TMPL_ELSE -->
105                                         <option value="3">Wednesday</option>
106                                 <!-- /TMPL_IF -->
107                                 <!-- TMPL_IF name="dow4" -->
108                                         <option value="4" selected>Thursday</option>
109                                 <!-- TMPL_ELSE -->
110                                         <option value="4">Thursday</option>
111                                 <!-- /TMPL_IF -->
112                                 <!-- TMPL_IF name="dow5" -->
113                                         <option value="5" selected>Friday</option>
114                                 <!-- TMPL_ELSE -->
115                                         <option value="5">Friday</option>
116                                 <!-- /TMPL_IF -->
117                                 <!-- TMPL_IF name="dow6" -->
118                                         <option value="6" selected>Saturday</option>
119                                 <!-- TMPL_ELSE -->
120                                         <option value="6">Saturday</option>
121                                 <!-- /TMPL_IF -->
122                                 <!-- TMPL_IF name="dow7" -->
123                                         <option value="7" selected>Sunday</option>
124                                 <!-- TMPL_ELSE -->
125                                         <option value="7">Sunday</option>
126                                 <!-- /TMPL_IF -->
127                         </select>
128 </div>
129 <div id="bloc25">
130         <h2 class="bull">Subscription length</h2>
131         <p><label class="label100">Number of num</label><input type="text" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->"></p>
132         <p><label class="label100">Number of weeks</label><input type="text" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->"></p>
133         <p><label class="label100">Number of months</label><input type="text" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->"></p>
134
135 </div>
136 <div id="bloc25">
137         <h2 class="bull">Numbering calculation</h2>
138         <p>
139                 <p>Numbering formula: <input type="text" name="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->"></p>
140                 <table class="small">
141                         <tr>
142                                 <th class="bull">&nbsp;</th>
143                                 <th class="bull">X</th>
144                                 <th class="bull">Y</th>
145                                 <th class="bull">Z</th>
146                         </tr>
147                         <tr>
148                                 <td class="bull">Add</td>
149                                 <td>
150                                         <input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->">
151                                 </td>
152                                 <td>
153                                         <input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->">
154                                 </td>
155                                 <td>
156                                         <input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->">
157                                 </td>
158                         </tr>
159                         <tr>
160                                 <td class="bull">once every</td>
161                                 <td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->"></td>
162                                 <td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->"></td>
163                                 <td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->"></td>
164                         </tr>
165                         <tr>
166                                 <td class="bull">When more than</td>
167                                 <td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->"></td>
168                                 <td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->"></td>
169                                 <td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->"></td>
170                         </tr>
171                         <tr>
172                                 <td class="bull">Set back to</td>
173                                 <td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->"></td>
174                                 <td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->"></td>
175                                 <td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->"></td>
176                         </tr>
177                         <tr>
178                                 <td class="bull">
179                                         <!-- TMPL_IF name="mod" -->
180                                                 Last value
181                                         <!-- TMPL_ELSE -->
182                                                 Begins with
183                                         <!-- /TMPL_IF -->
184                                 </td>
185                                 <td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->"></td>
186                                 <td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->"></td>
187                                 <td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->"></td>
188                         </tr>
189                 </table>
190         </p>
191 </div>
192 <!-- TMPL_IF name="mod" -->
193         <input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" class="button bull">
194 <!-- TMPL_ELSE -->
195         <input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" class="button bull">
196 <!-- /TMPL_IF -->
197 </div>
198
199 </form>
200 <!-- TMPL_INCLUDE NAME="bull-bottom.inc" -->
201
202 <script language="JavaScript" type="text/javascript">
203
204 function Plugin(f)
205 {
206          window.open("subscription-bib-search.pl","Find a bib index",'width=500,height=400,toolbar=false,scrollbars=yes');
207 }
208
209 function FindAcqui(f)
210 {
211          window.open("acqui-search.pl","Find a supplier",'width=500,height=400,toolbar=false,scrollbars=yes');
212 }
213
214
215 function Check(f)
216 {
217   if (f.dow.value.length != 0
218         && f.startdate.value.length != 0 && f.dow.value.length != 0)
219         {
220 //              alert('subscription ok');
221                 document.f.submit();
222         }
223 else
224 {
225         alert('field marked with * are mandatory');
226 }
227         return false;
228 }
229 </script>