X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=labels%2Flabel-save-template.pl;h=492379023cdd8946ef5dab65969e39ff50dae822;hb=fffff30b13be681c9c6f9424dd16fa07e13470a9;hp=2ecda4f4ac1cca16a8fdb71423236381fd146048;hpb=6e2564450e93fc0b2fd66c71d6c3c128a3099ccd;p=koha_fer diff --git a/labels/label-save-template.pl b/labels/label-save-template.pl index 2ecda4f4ac..492379023c 100755 --- a/labels/label-save-template.pl +++ b/labels/label-save-template.pl @@ -6,8 +6,7 @@ use C4::Auth; use C4::Context; use C4::Output; use C4::Labels; -use C4::Interface::CGI::Output; -use HTML::Template; +use HTML::Template::Pro; use POSIX; #use Data::Dumper; @@ -30,21 +29,25 @@ my $cols = $query->param('cols'); my $rows = $query->param('rows'); my $colgap = $query->param('colgap'); my $rowgap = $query->param('rowgap'); +my $font = $query->param('fonts'); my $fontsize = $query->param('fontsize'); my $units = $query->param('units'); my $active = $query->param('active'); +my $prof_id = $query->param('prof_id'); - -SaveTemplate( +my $dberror = SaveTemplate( $tmpl_id, $tmpl_code, $tmpl_desc, $page_width, $page_height, $label_width, $label_height, $topmargin, $leftmargin, $cols, $rows, $colgap, - $rowgap, $fontsize, $units + $rowgap, $font, $fontsize, $units ); +SetAssociatedProfile( $prof_id, $tmpl_id ) if $prof_id; + +warn "Database returned the following error: $dberror" if $dberror; - print $query->redirect("./label-templates.pl"); +print $query->redirect("./label-templates.pl");