From 6ebf1ba56c555d04e559b311b021e29eece19112 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Tue, 29 Dec 2009 15:17:15 +0100 Subject: [PATCH] Revert "(bug #3801) fix itemtype administration" This reverts commit 0dca25841d90cfb86080bbce37f0a0f8c09904ae. --- admin/itemtypes.pl | 11 ++++++++--- .../prog/en/modules/admin/itemtypes.tmpl | 13 +++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index 4e6fc5ffb8..9f0395cdbc 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -112,6 +112,7 @@ 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'}, @@ -137,6 +138,7 @@ elsif ( $op eq 'add_validate' ) { my $query2 = ' UPDATE itemtypes SET description = ? + , renewalsallowed = ? , rentalcharge = ? , notforloan = ? , imageurl = ? @@ -146,6 +148,7 @@ 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 ), ( @@ -162,15 +165,16 @@ elsif ( $op eq 'add_validate' ) { else { # add a new itemtype & not modif an old my $query = " INSERT INTO itemtypes - (itemtype,description,rentalcharge, notforloan, imageurl,summary) + (itemtype,description,renewalsallowed,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' ? '' : @@ -200,13 +204,14 @@ elsif ( $op eq 'delete_confirm' ) { my $sth = $dbh->prepare( -"select itemtype,description,rentalcharge from itemtypes where itemtype=?" +"select itemtype,description,renewalsallowed,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 4c34695486..a519c0ee64 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl @@ -224,6 +224,10 @@ Item Types Administration (if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item) +
  • + + " /> +
  • " /> @@ -259,6 +263,7 @@ Item Types Administration Description Loan length + RenewalsAllowedNot allowed Rental charge
    " method="post"> " /> @@ -280,6 +285,7 @@ Item Types Administration Code Description Not for loan + Renewable Charge Actions @@ -298,6 +304,13 @@ Item Types Administration Yes  + + times + + No + + + -- 2.39.5