templating serials & moving them to a serials directory, more self-explanatory (bull...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / serials / subscription-add.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
2
3 <!-- TMPL_INCLUDE NAME="menus.inc" -->
4 <!-- TMPL_INCLUDE NAME="menu-catalogue.inc" -->
5
6 <!--------------------------MAIN BODY OF PAGE-------------------------->
7 <!-- TMPL_IF name="mod" -->
8         <h1>Modify subscription</h1>
9         <form method="post" name="f" action="subscription-detail.pl">
10                 <input type="hidden" name="op" value="modsubscription" />
11                 <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
12 <!-- TMPL_ELSE -->
13         <h1>Add a subscription</h1>
14         <form method="post" name="f">
15 <!-- /TMPL_IF -->
16 <div id="serials_subscription_add_information">
17         <h2>Subscription information</h2>
18                 <input type="hidden" name="op" value="addsubscription" />
19                 <input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->" />
20                 <p>Librarian <!-- TMPL_VAR name="user" --></p>
21                 <p><label>Supplier</label><input type="text" name="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid" -->" size=4 /> (<input type="text" name="aqbooksellername" value="<!-- TMPL_VAR name="aqbooksellername" -->" disabled readonly />)<a href="#" onClick="FindAcqui(f)">...</a></p>
22                 <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="bibliotitle" -->" disabled readonly />)<a href="#" onClick="Plugin(f)">...</a></p>
23                 <p><label>Notes</label><textarea name="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea></p>
24                 <!-- TMPL_IF name="letters" -->
25                         <p><label>Enable issue alert</label>
26                                 <select name="letter">
27                                         <option value=""></option>
28                                         <!-- TMPL_LOOP name="letters" -->
29                                                 <!-- TMPL_IF name="selected" -->
30                                                         <option value="<!-- TMPL_VAR name="code" -->" selected><!-- TMPL_VAR name="name" --></option>
31                                                 <!-- TMPL_ELSE -->
32                                                         <option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
33                                                 <!-- /TMPL_IF -->
34                                         <!-- /TMPL_LOOP -->
35                                 </select>
36                         </p>
37                 <!-- /TMPL_IF -->
38                 <p><label>Distributed to </label><a href="#" onClick="DistributedTo()">...</a></p>
39                 <p>warning</p>
40                 <ul>
41                         <li>remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
42                         <li>You also must have selected a supplier if you want to ask for late issues</li>
43                 </ul>
44 </div>
45 <div id="serials_subscription_add_planning">
46         <h2>Planning</h2>
47         <p><label>Beginnning date:</label> <input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size=13 maxlength=10 /></p>
48         <p><label>Frequency (*)</label>
49                         <select name="periodicity" size="1">
50                                 <option value="" selected>Unknown</option>
51                                 <!-- TMPL_IF name="periodicity1" -->
52                                         <option value="1" selected>1/day</option>
53                                 <!-- TMPL_ELSE -->
54                                         <option value="1">1/day</option>
55                                 <!-- /TMPL_IF -->
56                                 <!-- TMPL_IF name="periodicity2" -->
57                                         <option value="2" selected>1/week</option>
58                                 <!-- TMPL_ELSE -->
59                                         <option value="2">1/week</option>
60                                 <!-- /TMPL_IF -->
61                                 <!-- TMPL_IF name="periodicity3" -->
62                                         <option value="3" selected>1/2 weeks (2/month)</option>
63                                 <!-- TMPL_ELSE -->
64                                         <option value="3">1/2 weeks (2/months)</option>
65                                 <!-- /TMPL_IF -->
66                                 <!-- TMPL_IF name="periodicity4" -->
67                                         <option value="4" selected>1/3 weeks</option>
68                                 <!-- TMPL_ELSE -->
69                                         <option value="4">1/3 weeks</option>
70                                 <!-- /TMPL_IF -->
71                                 <!-- TMPL_IF name="periodicity5" -->
72                                         <option value="5" selected>1/month</option>
73                                 <!-- TMPL_ELSE -->
74                                         <option value="5">1/month</option>
75                                 <!-- /TMPL_IF -->
76                                 <!-- TMPL_IF name="periodicity6" -->
77                                         <option value="6" selected>1/2 months (6/year)</option>
78                                 <!-- TMPL_ELSE -->
79                                         <option value="6">1/2 months (6/year)</option>
80                                 <!-- /TMPL_IF -->
81                                 <!-- TMPL_IF name="periodicity7" -->
82                                         <option value="7" selected>1/3 months (1/quarter)</option>
83                                 <!-- TMPL_ELSE -->
84                                         <option value="7">1/3 months (1/quarter)</option>
85                                 <!-- /TMPL_IF -->
86                                 <!-- periodicity8 is 1/quarter, exactly like periodicity7 -->
87                                 <!-- TMPL_IF name="periodicity9" -->
88                                         <option value="9" selected>2/years</option>
89                                 <!-- TMPL_ELSE -->
90                                         <option value="9">2/years</option>
91                                 <!-- /TMPL_IF -->
92                                 <!-- TMPL_IF name="periodicity10" -->
93                                         <option value="10" selected>1/year</option>
94                                 <!-- TMPL_ELSE -->
95                                         <option value="10">1/year</option>
96                                 <!-- /TMPL_IF -->
97                                 <!-- TMPL_IF name="periodicity11" -->
98                                         <option value="11" selected>1/2 years</option>
99                                 <!-- TMPL_ELSE -->
100                                         <option value="11">1/2 years</option>
101                                 <!-- /TMPL_IF -->
102                         </select>
103         </p>
104         <p><label>Arrives on</label>
105                         <select name="dow" size="1">
106                                 <option value="">None</option>
107                                 <!-- TMPL_IF name="dow1" -->
108                                         <option value="1" selected>Monday</option>
109                                 <!-- TMPL_ELSE -->
110                                         <option value="1">Monday</option>
111                                 <!-- /TMPL_IF -->
112                                 <!-- TMPL_IF name="dow2" -->
113                                         <option value="2" selected>Tuesday</option>
114                                 <!-- TMPL_ELSE -->
115                                         <option value="2">Tuesday</option>
116                                 <!-- /TMPL_IF -->
117                                 <!-- TMPL_IF name="dow3" -->
118                                         <option value="3" selected>Wednesday</option>
119                                 <!-- TMPL_ELSE -->
120                                         <option value="3">Wednesday</option>
121                                 <!-- /TMPL_IF -->
122                                 <!-- TMPL_IF name="dow4" -->
123                                         <option value="4" selected>Thursday</option>
124                                 <!-- TMPL_ELSE -->
125                                         <option value="4">Thursday</option>
126                                 <!-- /TMPL_IF -->
127                                 <!-- TMPL_IF name="dow5" -->
128                                         <option value="5" selected>Friday</option>
129                                 <!-- TMPL_ELSE -->
130                                         <option value="5">Friday</option>
131                                 <!-- /TMPL_IF -->
132                                 <!-- TMPL_IF name="dow6" -->
133                                         <option value="6" selected>Saturday</option>
134                                 <!-- TMPL_ELSE -->
135                                         <option value="6">Saturday</option>
136                                 <!-- /TMPL_IF -->
137                                 <!-- TMPL_IF name="dow7" -->
138                                         <option value="7" selected>Sunday</option>
139                                 <!-- TMPL_ELSE -->
140                                         <option value="7">Sunday</option>
141                                 <!-- /TMPL_IF -->
142                         </select>
143 </div>
144 <div id="serials_subscription_add_length">
145         <h2>Subscription length</h2>
146         <p>* fill 1 from :</p>
147         <ul>
148                 <p><label>Number of issues</label><input type="text" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->" /></p>
149                 <p><label>Number of weeks</label><input type="text" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->" /></p>
150                 <p><label>Number of months</label><input type="text" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->" /></p>
151         </ul>
152 </div>
153 <div id="serials_subscription_add_calculation">
154         <h2>Numbering calculation</h2>
155         <p>
156                 <p>Numbering formula: <input type="text" name="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->"></p>
157                 <table class="small">
158                         <tr>
159                                 <th>&nbsp;</th>
160                                 <th>X</th>
161                                 <th>Y</th>
162                                 <th>Z</th>
163                         </tr>
164                         <tr>
165                                 <td>Add</td>
166                                 <td>
167                                         <input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->" />
168                                 </td>
169                                 <td>
170                                         <input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->" />
171                                 </td>
172                                 <td>
173                                         <input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->" />
174                                 </td>
175                         </tr>
176                         <tr>
177                                 <td>once every</td>
178                                 <td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->" /></td>
179                                 <td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->" /></td>
180                                 <td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->" /></td>
181                         </tr>
182                         <tr>
183                                 <td>When more than</td>
184                                 <td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->" /></td>
185                                 <td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->" /></td>
186                                 <td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->" /></td>
187                         </tr>
188                         <!-- TMPL_IF name="mod" -->
189                         <tr>
190                                 <td>The loop is for instance</td>
191                                 <td><input type="text" name="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->" /></td>
192                                 <td><input type="text" name="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->" /></td>
193                                 <td><input type="text" name="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->" /></td>
194                         </tr>
195                         <!-- /TMPL_IF -->
196                         <tr>
197                                 <td>Set back to</td>
198                                 <td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->" /></td>
199                                 <td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->" /></td>
200                                 <td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->" /></td>
201                         </tr>
202                         <tr>
203                                 <td>
204                                         <!-- TMPL_IF name="mod" -->
205                                                 Last value
206                                         <!-- TMPL_ELSE -->
207                                                 Begins with
208                                         <!-- /TMPL_IF -->
209                                 </td>
210                                 <td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->" /></td>
211                                 <td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->" /></td>
212                                 <td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->" /></td>
213                         </tr>
214                 </table>
215         </p>
216 </div>
217 <!-- TMPL_IF name="mod" -->
218         <input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" />
219 <!-- TMPL_ELSE -->
220         <input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" />
221 <!-- /TMPL_IF -->
222 </div>
223
224 </form>
225
226 <script language="JavaScript" type="text/javascript">
227
228 function Plugin(f)
229 {
230          window.open("subscription-bib-search.pl","Find a bib index",'width=500,height=400,toolbar=false,scrollbars=yes');
231 }
232
233 function FindAcqui(f)
234 {
235          window.open("acqui-search.pl","Find a supplier",'width=500,height=400,toolbar=false,scrollbars=yes');
236 }
237
238 function DistributedTo()
239 {
240          window.open("distributedto.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->","Distributed to",'width=800,height=600,toolbar=false,scrollbars=yes');
241 }
242
243
244 function Check(f)
245 {
246         if (f.startdate.value.length != 0 && 
247                         f.numberlength.value+f.weeklength.value+f.monthlength.value > 0)
248                 {
249                         document.f.submit();
250                 }
251 else
252 {
253         alert('field marked with * are mandatory');
254 }
255         return false;
256 }
257 </script>
258 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->