use Modern::Perl;
use CGI qw ( -utf8 );
-use File::Spec;
-use C4::Koha;
+use C4::Koha qw( getImageSets GetAuthorisedValues );
use C4::Context;
-use C4::Auth;
-use C4::Output;
+use C4::Auth qw( get_template_and_user );
+use C4::Output qw( output_html_with_http_headers );
use Koha::ItemTypes;
use Koha::ItemType;
use Koha::Localizations;
query => $input,
type => "intranet",
flagsrequired => { parameters => 'manage_itemtypes' },
- debug => 1,
}
);
my $parent_types = Koha::ItemTypes->search({parent_type=>undef,itemtype => {'!='=>$itemtype_code}});
my $imagesets = C4::Koha::getImageSets( checked => ( $itemtype ? $itemtype->imageurl : undef ) );
my $searchcategory = GetAuthorisedValues("ITEMTYPECAT");
- my $translated_languages = C4::Languages::getTranslatedLanguages( undef , C4::Context->preference('template') );
+ my $translated_languages = C4::Languages::getTranslatedLanguages( "both", C4::Context->preference('template') );
$template->param(
itemtype => $itemtype,
parent_type => $parent_type,
my $searchcategory = $input->param('searchcategory');
my $rentalcharge_daily_calendar = $input->param('rentalcharge_daily_calendar') // 0;
my $rentalcharge_hourly_calendar = $input->param('rentalcharge_hourly_calendar') // 0;
+ my $automatic_checkin = $input->param('automatic_checkin') // 0;
if ( $itemtype and $is_a_modif ) { # it's a modification
$itemtype->description($description);
$itemtype->searchcategory($searchcategory);
$itemtype->rentalcharge_daily_calendar($rentalcharge_daily_calendar);
$itemtype->rentalcharge_hourly_calendar($rentalcharge_hourly_calendar);
+ $itemtype->automatic_checkin($automatic_checkin);
eval {
$itemtype->store;
searchcategory => $searchcategory,
rentalcharge_daily_calendar => $rentalcharge_daily_calendar,
rentalcharge_hourly_calendar => $rentalcharge_hourly_calendar,
+ automatic_checkin => $automatic_checkin,
}
);
eval {
if ( $op eq 'list' ) {
$template->param(
- itemtypes => scalar Koha::ItemTypes->search,
+ itemtypes => Koha::ItemTypes->search,
messages => \@messages,
);
}