use strict;
#use warnings; FIXME - Bug 2505
-use CGI;
+use CGI qw ( -utf8 );
use List::Util qw/min/;
use File::Spec;
$searchfield =~ s/\,//g;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{
- template_name => "admin/itemtypes.tmpl",
+ template_name => "admin/itemtypes.tt",
query => $input,
type => "intranet",
authnotrequired => 0,
my $dbh = C4::Context->dbh;
+my $sip_media_type = $input->param('sip_media_type');
+undef($sip_media_type) if defined($sip_media_type) and $sip_media_type =~ /^\s*$/;
+
################## ADD_FORM ##################################
# called by default. Used to create form to add or modify a record
if ( $op eq 'add_form' ) {
checkinmsgtype => $data->{'checkinmsgtype'},
imagesets => $imagesets,
remote_image => $remote_image,
+ sip_media_type => $data->{sip_media_type},
);
# END $OP eq ADD_FORM
, summary = ?
, checkinmsg = ?
, checkinmsgtype = ?
+ , sip_media_type = ?
WHERE itemtype = ?
';
$sth = $dbh->prepare($query2);
$input->param('summary'),
$input->param('checkinmsg'),
$input->param('checkinmsgtype'),
+ $sip_media_type,
$input->param('itemtype')
);
}
else { # add a new itemtype & not modif an old
my $query = "
INSERT INTO itemtypes
- (itemtype,description,rentalcharge, notforloan, imageurl, summary, checkinmsg, checkinmsgtype)
+ (itemtype,description,rentalcharge, notforloan, imageurl, summary, checkinmsg, checkinmsgtype, sip_media_type)
VALUES
- (?,?,?,?,?,?,?,?);
+ (?,?,?,?,?,?,?,?,?);
";
my $sth = $dbh->prepare($query);
my $image = $input->param('image');
$input->param('summary'),
$input->param('checkinmsg'),
$input->param('checkinmsgtype'),
+ $sip_media_type,
);
}