1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha › Acquisitions › Contracts ›
3 <!-- TMPL_IF NAME="add_form" -->
4 <!-- TMPL_IF NAME="contractnumber" -->Modify contract '<!-- TMPL_VAR NAME="contractname" -->'
5 <!-- TMPL_ELSE -->New contract<!-- /TMPL_IF -->
7 <!-- TMPL_IF NAME="else" -->Contracts of <!-- TMPL_VAR NAME="booksellername" --><!-- /TMPL_IF -->
8 <!-- TMPL_IF NAME="add_validate" -->Data recorded<!-- /TMPL_IF -->
9 <!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Contract '<!-- TMPL_VAR NAME="contractnumber" -->'<!-- /TMPL_IF -->
10 <!-- TMPL_IF NAME="delete_confirmed" -->Contract Deleted<!-- /TMPL_IF --></title>
11 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
12 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
13 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/acq.js"></script>
14 <script type="text/javascript">
16 // to check if the data are correctly entered.
19 var _alertString=_("Form not submitted because of the following problem(s)");
20 _alertString +="\n-------------------------------------------------------------------\n\n";
21 if (!(isNotNull(ff.contractname,0))){
23 _alertString += _("- Name missing") + "\n";
25 var startDate = Date_from_syspref($("#contractstartdate").val());
26 var endDate = Date_from_syspref($("#contractenddate").val());
27 if (!parseInt(startDate.getTime())) {
29 _alertString += _("- Start date missing or invalid.") + "\n";
31 if (!parseInt(endDate.getTime())) {
33 _alertString += _("- End date missing or invalid.") + "\n";
36 if (startDate > endDate) {
38 _alertString += _("Wrong date! start date cannot be after end date.") + "\n";
40 if (endDate < (new Date)) {
42 _alertString += _("End date before today, Invalid end date!") + "\n";
44 if (ok) { // if there is a problem
55 <!-- TMPL_INCLUDE NAME="header.inc" -->
56 <!-- TMPL_INCLUDE NAME="contracts-admin-search.inc" -->
58 <div id="breadcrumbs">
59 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
61 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
63 <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!--TMPL_VAR name="booksellerid" -->"><!-- TMPL_VAR name="booksellername" --></a>
65 <!-- TMPL_IF NAME="add_form" -->
66 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->">Contracts</a>
68 <!-- TMPL_IF NAME="contractnumber" -->Modify contract '<!-- TMPL_VAR NAME="contractname" -->'
69 <!-- TMPL_ELSE -->New contract
72 <!-- TMPL_IF NAME="add_validate" -->
73 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->">Contracts</a>
74 › Data recorded
76 <!-- TMPL_IF NAME="delete_confirm" -->
77 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->">Contracts</a>
78 › Confirm Deletion of Contract <!-- TMPL_VAR NAME="contractnumber" -->
80 <!-- TMPL_IF NAME="delete_confirmed" -->
81 <a href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->">Contracts</a> › Contract Deleted
83 <!-- TMPL_IF NAME="else" -->Contracts<!-- /TMPL_IF -->
86 <div id="doc" class="yui-t7">
89 <!-- TMPL_IF NAME="add_form" -->
90 <form name="Aform" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
91 <input type="hidden" name="op" value="add_validate" />
92 <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
93 <input type="hidden" name="checked" value="0" />
94 <!-- TMPL_IF NAME="contractnumber" -->
95 <h1>Modify contract <!-- TMPL_VAR NAME="contractname" --> for <!-- TMPL_VAR NAME="booksellername" --></h1>
97 <h1>New contract for <!-- TMPL_VAR NAME="booksellername" --></h1>
99 <fieldset class="rows">
101 <!-- TMPL_IF NAME="contractnumber" -->
102 <li><span class="label">Contract id </span><!-- TMPL_VAR NAME="contractnumber" -->
103 <input type="hidden" name="contractnumber" value="<!-- TMPL_VAR NAME="contractnumber" -->" />
104 <input type="hidden" name="is_a_modif" value="1" />
107 <li><label for="contractname" class="required">Name *</label>
108 <input type="text" name="contractname" id="contractname" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="contractname" -->" />
110 <li><label for="contractdescription">Description</label>
111 <input type="text" name="contractdescription" id="contractdescription" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="contractdescription" -->" />
113 <li><label for="contractstartdate" class="required">Start date *</label>
114 <input type="text" name="contractstartdate" id="contractstartdate" value="<!-- TMPL_VAR NAME="contractstartdate" -->" maxlength="10" size="10"/>
115 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="contractstartdate_button" alt="Show Calendar" />
116 <script language="JavaScript" type="text/javascript">
119 inputField : "contractstartdate",
120 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
121 button : "contractstartdate_button"
125 <div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
127 <li><label for="contractenddate" class="required">End date *</label>
128 <input type="text" name="contractenddate" id="contractenddate" value="<!-- TMPL_VAR NAME="contractenddate" -->" maxlength="10" size="10" />
129 <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="contractenddate_button" alt="Show Calendar" />
130 <script language="JavaScript" type="text/javascript">
133 inputField : "contractenddate",
134 ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
135 button : "contractenddate_button"
139 <div class="hint"><!-- TMPL_INCLUDE NAME="date-format.inc" --></div>
143 <fieldset class="action">
144 <input type="button" value="Save" onclick="Check(this.form);" /> <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&contractnumber=<!-- TMPL_VAR NAME="contractnumber" -->">Cancel</a>
148 <!-- TMPL_IF NAME="add_validate" -->
149 <h3>Data recorded</h3>
150 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
151 <input type="submit" value="OK" />
154 <!-- TMPL_IF NAME="delete_confirm" -->
155 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
157 <legend>Confirm Deletion of Contract <!-- TMPL_VAR NAME="contractnumber" --></legend>
159 <tr><th scope="row">Contract number:</th><td><!-- TMPL_VAR NAME="contractnumber" --></td></tr>
160 <tr><th scope="row">Contract name:</th><td><!-- TMPL_VAR NAME="contractname" --></td></tr>
161 <tr><th scope="row">Contract description:</th><td><!-- TMPL_VAR NAME="contractdescription" --></td></tr>
162 <tr><th scope="row">Contract start date:</th><td><!-- TMPL_VAR NAME="contractstartdate" --></td></tr>
163 <tr><th scope="row">Contract end date:</th><td><!-- TMPL_VAR NAME="contractenddate" --></td></tr>
164 <tr><th scope="row">Vendor:</th><td><!-- TMPL_VAR NAME="booksellername" --></td></tr>
166 <fieldset class="action">
167 <input type="hidden" name="op" value="delete_confirmed" />
168 <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR name="booksellerid" -->" />
169 <input type="hidden" name="contractnumber" value="<!-- TMPL_VAR NAME="contractnumber" -->" />
170 <input type="submit" value="Delete this Contract" />
171 <a class="cancel" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&contractnumber=<!-- TMPL_VAR NAME="contractnumber" -->">Cancel</a>
176 <!-- TMPL_IF NAME="delete_confirmed" -->
177 <h3>Contract Deleted</h3>
178 <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
179 <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR name="booksellerid" -->" />
180 <input type="submit" value="OK" />
183 <!-- TMPL_IF NAME="else" -->
185 <script type="text/javascript">
187 // prepare DOM for YUI Toolbar
188 $(document).ready(function() {
191 // YUI Toolbar Functions
192 function yuiToolbar() {
193 new YAHOO.widget.Button("newcontract");
198 <li><a id="newcontract" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=<!-- TMPL_VAR name="booksellerid" -->">New Contract</a></li>
201 <h2>Contract(s) of <!-- TMPL_VAR name="booksellername" --></h2>
202 <!-- TMPL_IF name="loop" -->
205 <th scope="col">Name</th>
206 <th scope="col">Description</th>
207 <th scope="col">Start date</th>
208 <th scope="col">End date</th>
209 <th scope="col" colspan="2"> </th>
211 <!-- TMPL_LOOP NAME="loop" -->
212 <!-- TMPL_IF NAME="__even__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
214 <a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&contractnumber=<!-- TMPL_VAR NAME="contractnumber" -->"><!-- TMPL_VAR NAME="contractname" --></a>
216 <td><!-- TMPL_VAR NAME="contractdescription" --></td>
217 <td><!-- TMPL_VAR NAME="contractstartdate" --></td>
218 <td><!-- TMPL_VAR NAME="contractenddate" --></td>
219 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&contractnumber=<!-- TMPL_VAR NAME="contractnumber" -->&booksellerid=<!-- TMPL_VAR name="booksellerid" -->">Edit</a></td>
220 <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&contractnumber=<!-- TMPL_VAR NAME="contractnumber" -->&booksellerid=<!-- TMPL_VAR name="booksellerid" -->">Delete</a></td>
225 <div class="dialog message">There are no contracts with this vendor.</div>
230 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->