Bug 5358: Show cancelled orders in basket page
[koha.git] / C4 / Creators / Layout.pm
index 1a912fe..73a19fa 100644 (file)
@@ -40,6 +40,8 @@ sub _check_params {
         'format_string',
         'layout_xml',           # FIXME: all layouts should be stored in xml format to greatly simplify handling -chris_n
         'creator',
+        'units',
+        'start_label',
     );
     if (scalar(@_) >1) {
         my %given_params = @_;
@@ -59,6 +61,7 @@ sub _check_params {
     return $exit_code;
 }
 
+use constant PRESET_FIELDS => [qw(title author isbn issn itemtype barcode itemcallnumber)];
 sub new {
     my $invocant = shift;
     my $self = '';
@@ -68,6 +71,9 @@ sub new {
     my $type = ref($invocant) || $invocant;
     if (grep {$_ eq 'Labels'} @_) {
        $self = {
+            layout_xml      =>      '',
+            units           =>      'POINT',
+            start_label     =>      1,
             barcode_type    =>      'CODE39',
             printing_type   =>      'BAR',
             layout_name     =>      'DEFAULT',
@@ -76,7 +82,7 @@ sub new {
             font_size       =>      3,
             callnum_split   =>      0,
             text_justify    =>      'L',
-            format_string   =>      'title, author, isbn, issn, itemtype, barcode, callnumber',
+            format_string   =>      join(', ', @{ PRESET_FIELDS() }),
             @_,
         };
     }