[Koha-patches] [PATCH] (bug #3801) fix itemtype administration
Nahuel ANGELINETTI
nahuel.angelinetti at biblibre.com
Mon Nov 23 09:39:12 CET 2009
This delete all code related to renewals allowed in itemtype administration.
---
admin/itemtypes.pl | 11 +++--------
.../prog/en/modules/admin/itemtypes.tmpl | 13 -------------
2 files changed, 3 insertions(+), 21 deletions(-)
diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl
index 9f0395c..4e6fc5f 100755
--- a/admin/itemtypes.pl
+++ b/admin/itemtypes.pl
@@ -112,7 +112,6 @@ if ( $op eq 'add_form' ) {
$template->param(
itemtype => $itemtype,
description => $data->{'description'},
- renewalsallowed => $data->{'renewalsallowed'},
rentalcharge => sprintf( "%.2f", $data->{'rentalcharge'} ),
notforloan => $data->{'notforloan'},
imageurl => $data->{'imageurl'},
@@ -138,7 +137,6 @@ elsif ( $op eq 'add_validate' ) {
my $query2 = '
UPDATE itemtypes
SET description = ?
- , renewalsallowed = ?
, rentalcharge = ?
, notforloan = ?
, imageurl = ?
@@ -148,7 +146,6 @@ elsif ( $op eq 'add_validate' ) {
$sth = $dbh->prepare($query2);
$sth->execute(
$input->param('description'),
- $input->param('renewalsallowed'),
$input->param('rentalcharge'),
( $input->param('notforloan') ? 1 : 0 ),
(
@@ -165,16 +162,15 @@ elsif ( $op eq 'add_validate' ) {
else { # add a new itemtype & not modif an old
my $query = "
INSERT INTO itemtypes
- (itemtype,description,renewalsallowed,rentalcharge, notforloan, imageurl,summary)
+ (itemtype,description,rentalcharge, notforloan, imageurl,summary)
VALUES
- (?,?,?,?,?,?,?);
+ (?,?,?,?,?,?);
";
my $sth = $dbh->prepare($query);
my $image = $input->param('image');
$sth->execute(
$input->param('itemtype'),
$input->param('description'),
- $input->param('renewalsallowed'),
$input->param('rentalcharge'),
$input->param('notforloan') ? 1 : 0,
$image eq 'removeImage' ? '' :
@@ -204,14 +200,13 @@ elsif ( $op eq 'delete_confirm' ) {
my $sth =
$dbh->prepare(
-"select itemtype,description,renewalsallowed,rentalcharge from itemtypes where itemtype=?"
+"select itemtype,description,rentalcharge from itemtypes where itemtype=?"
);
$sth->execute($itemtype);
my $data = $sth->fetchrow_hashref;
$template->param(
itemtype => $itemtype,
description => $data->{description},
- renewalsallowed => $data->{renewalsallowed},
rentalcharge => sprintf( "%.2f", $data->{rentalcharge} ),
imageurl => $data->{imageurl},
total => $total
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl
index a519c0e..4c34695 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl
@@ -225,10 +225,6 @@ Item Types Administration
</li>
<li>
- <label for="renewalsallowed">Renewals: </label>
- <input type="text" id="renewalsallowed" name="renewalsallowed" size="3" maxlength="3" value="<!-- TMPL_VAR NAME="renewalsallowed" -->" />
- </li>
- <li>
<label for="rentalcharge">Rental charge: </label>
<input type="text" id="rentalcharge" name="rentalcharge" size="10" value="<!-- TMPL_VAR name="rentalcharge" -->" />
</li>
@@ -263,7 +259,6 @@ Item Types Administration
<tr><th scope="row">Description</th><td><!-- TMPL_VAR name="description" --></td></tr>
<tr><th scope="row">Loan length</th><td><!-- TMPL_VAR name="loanlength" --></td></tr>
- <tr><th scope="row">Renewals</th><td><!-- TMPL_IF name="renewalsallowed" -->Allowed<!-- TMPL_ELSE -->Not allowed<!-- /TMPL_IF --></td></tr>
<tr><th scope="row">Rental charge</th><td><!-- TMPL_VAR name="rentalcharge" --></td></tr></table>
<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
<input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" /><!-- TMPL_IF name="total" -->
@@ -285,7 +280,6 @@ Item Types Administration
<th>Code</th>
<th>Description</th>
<th>Not for loan</th>
- <th>Renewable</th>
<th>Charge</th>
<th>Actions</th>
</tr>
@@ -304,13 +298,6 @@ Item Types Administration
<td><!-- TMPL_VAR name="description" --></td>
<td><!-- TMPL_IF NAME="notforloan" -->Yes<!-- TMPL_ELSE --> <!-- /TMPL_IF --></td>
<td>
- <!-- TMPL_IF NAME="renewalsallowed" -->
- <!-- TMPL_VAR name="renewalsallowed" --> times
- <!-- TMPL_ELSE -->
- No
- <!-- /TMPL_IF -->
- </td>
- <td>
<!-- TMPL_UNLESS name="notforloan" -->
<!-- TMPL_VAR NAME="rentalcharge" -->
<!-- /TMPL_UNLESS -->
--
1.6.3.3
More information about the Koha-patches
mailing list