use warnings;
use CGI;
+use MIME::Base64;
use C4::Auth;
use C4::Context;
use C4::Koha;
$tabsysprefs{emailPurchaseSuggestions}="Acquisitions";
$tabsysprefs{RenewSerialAddsSuggestion}="Acquisitions";
$tabsysprefs{AcqCreateItem}="Acquisitions";
- $tabsysprefs{pdfformat}="Acquisitions";
+ $tabsysprefs{OrderPdfFormat}="Acquisitions";
+ $tabsysprefs{OrderPdfTemplate}="Acquisitions";
$tabsysprefs{CurrencyFormat}="Acquisitions";
# Admin
if ( not defined( $data->{'type'} ) ) {
$params->{'type-free'} = 1;
$params->{'fieldlength'} = ( defined( $data->{'options'} ) and $data->{'options'} and $data->{'options'} > 0 );
+ } elsif ( $data->{'type'} eq 'Upload' ) {
+ $params->{'type-upload'} = 1;
} elsif ( $data->{'type'} eq 'Choice' ) {
$params->{'type-choice'} = 1;
} elsif ( $data->{'type'} eq 'YesNo' ) {
$value = $params->{'value'};
}
}
+
+ if ( $input->param('preftype') eq 'Upload' ) {
+ my $lgtfh = $input->upload('value');
+ $value = join '', <$lgtfh>;
+ $value = encode_base64($value);
+ }
+
if ( $sth->rows ) {
unless ( C4::Context->config('demo') ) {
my $sth = $dbh->prepare("update systempreferences set value=?,explanation=?,type=?,options=? where variable=?");