Bug 14870: (followup) Remove stray C4::Dates from circ/returns.pl
[koha.git] / labels / label-edit-layout.pl
index db3d32c..f84a01d 100755 (executable)
@@ -5,34 +5,34 @@
 #
 # This file is part of Koha.
 #
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 #
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 use strict;
 use warnings;
 
-use CGI;
+use CGI qw ( -utf8 );
 use POSIX;
 
 use C4::Auth qw(get_template_and_user);
 use C4::Output qw(output_html_with_http_headers);
-use C4::Creators 1.000000;
-use C4::Labels 1.000000;
+use C4::Creators;
+use C4::Labels;
 
 my $cgi = new CGI;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     {
-        template_name   => "labels/label-edit-layout.tmpl",
+        template_name   => "labels/label-edit-layout.tt",
         query           => $cgi,
         type            => "intranet",
         authnotrequired => 0,
@@ -41,8 +41,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
     }
 );
 
-my $op = $cgi->param('op') || $ARGV[0] || '';
-my $layout_id = $cgi->param('layout_id') || $cgi->param('element_id') || $ARGV[1] || '';
+my $op = $cgi->param('op') || '';
+my $layout_id = $cgi->param('layout_id') || $cgi->param('element_id') || '';
 my $layout_choice = $cgi->param('layout_choice') || '';
 our $layout = '';
 
@@ -107,6 +107,7 @@ elsif  ($op eq 'save') {
                     printing_type   => $cgi->param('printing_type') || 'BAR',
                     layout_name     => $cgi->param('layout_name') || 'DEFAULT',
                     guidebox        => ($cgi->param('guidebox') ? 1 : 0),
+                    oblique_title   => ($cgi->param('oblique_title') ? 1 : 0),
                     font            => $cgi->param('font') || 'TR',
                     font_size       => $cgi->param('font_size') || 3,
                     callnum_split   => ($cgi->param('callnum_split') ? 1 : 0),
@@ -145,6 +146,7 @@ $template->param(
         layout_id       => $layout->get_attr('layout_id') > -1 ? $layout->get_attr('layout_id') : '',
         layout_name     => $layout->get_attr('layout_name'),
         guidebox        => $layout->get_attr('guidebox'),
+        oblique_title   => $layout->get_attr('oblique_title'),
         font_size       => $layout->get_attr('font_size'),
         callnum_split   => $layout->get_attr('callnum_split'),
         format_string   => $layout->get_attr('format_string'),