|
Lines 103-120
if ( $op eq 'edit_form' ) {
Link Here
|
| 103 |
$cgi->param( 'format_string', $format_string ); |
103 |
$cgi->param( 'format_string', $format_string ); |
| 104 |
} |
104 |
} |
| 105 |
my @params = ( |
105 |
my @params = ( |
| 106 |
barcode_type => scalar $cgi->param('barcode_type') || 'CODE39', |
106 |
barcode_type => scalar $cgi->param('barcode_type') || 'CODE39', |
| 107 |
printing_type => scalar $cgi->param('printing_type') || 'BAR', |
107 |
printing_type => scalar $cgi->param('printing_type') || 'BAR', |
| 108 |
layout_name => scalar $cgi->param('layout_name') || 'DEFAULT', |
108 |
layout_name => scalar $cgi->param('layout_name') || 'DEFAULT', |
| 109 |
guidebox => ( $cgi->param('guidebox') ? 1 : 0 ), |
109 |
guidebox => ( $cgi->param('guidebox') ? 1 : 0 ), |
| 110 |
oblique_title => ( $cgi->param('oblique_title') ? 1 : 0 ), |
110 |
oblique_title => ( $cgi->param('oblique_title') ? 1 : 0 ), |
| 111 |
font => scalar $cgi->param('font') || 'TR', |
111 |
font => scalar $cgi->param('font') || 'TR', |
| 112 |
font_size => scalar $cgi->param('font_size') || 3, |
112 |
font_size => scalar $cgi->param('font_size') || 3, |
| 113 |
scale_width => scalar $cgi->param('scale_width') || 0.8, |
113 |
scale_width => scalar $cgi->param('scale_width') || 0.8, |
| 114 |
scale_height => scalar $cgi->param('scale_height') || 0.01, |
114 |
scale_height => scalar $cgi->param('scale_height') || 0.01, |
| 115 |
callnum_split => ( $cgi->param('callnum_split') ? 1 : 0 ), |
115 |
callnum_split => ( $cgi->param('callnum_split') ? 1 : 0 ), |
| 116 |
text_justify => scalar $cgi->param('text_justify') || 'L', |
116 |
text_justify => scalar $cgi->param('text_justify') || 'L', |
| 117 |
format_string => scalar $cgi->param('format_string') |
117 |
barcode_justify => scalar $cgi->param('barcode_justify') || 'L', |
|
|
118 |
format_string => scalar $cgi->param('format_string') |
| 118 |
|| 'title, author, isbn, issn, itemtype, barcode, itemcallnumber', |
119 |
|| 'title, author, isbn, issn, itemtype, barcode, itemcallnumber', |
| 119 |
); |
120 |
); |
| 120 |
if ($layout_id) { # if a label_id was passed in, this is an update to an existing layout |
121 |
if ($layout_id) { # if a label_id was passed in, this is an update to an existing layout |
|
Lines 132-159
if ( $op eq 'edit_form' ) {
Link Here
|
| 132 |
$layout = C4::Labels::Layout->new(); |
133 |
$layout = C4::Labels::Layout->new(); |
| 133 |
} |
134 |
} |
| 134 |
|
135 |
|
| 135 |
my $barcode_types = _set_selected( get_barcode_types(), $layout, 'barcode_type' ); |
136 |
my $barcode_types = _set_selected( get_barcode_types(), $layout, 'barcode_type' ); |
| 136 |
my $label_types = _set_selected( get_label_types(), $layout, 'printing_type' ); |
137 |
my $label_types = _set_selected( get_label_types(), $layout, 'printing_type' ); |
| 137 |
my $font_types = _set_selected( get_font_types(), $layout, 'font' ); |
138 |
my $font_types = _set_selected( get_font_types(), $layout, 'font' ); |
| 138 |
my $text_justification_types = _set_selected( get_text_justification_types(), $layout, 'text_justify' ); |
139 |
my $text_justification_types = _set_selected( get_text_justification_types(), $layout, 'text_justify' ); |
|
|
140 |
my $barcode_justification_types = _set_selected( get_text_justification_types(), $layout, 'barcode_justify' ); |
| 141 |
|
| 139 |
my ( $select_text_fields, $select_text_fields_cnt ) = _select_format_string( $layout->get_attr('format_string') ); |
142 |
my ( $select_text_fields, $select_text_fields_cnt ) = _select_format_string( $layout->get_attr('format_string') ); |
| 140 |
|
143 |
|
| 141 |
$template->param( |
144 |
$template->param( |
| 142 |
barcode_types => $barcode_types, |
145 |
barcode_types => $barcode_types, |
| 143 |
label_types => $label_types, |
146 |
label_types => $label_types, |
| 144 |
font_types => $font_types, |
147 |
font_types => $font_types, |
| 145 |
text_justification_types => $text_justification_types, |
148 |
text_justification_types => $text_justification_types, |
| 146 |
fields => $select_text_fields, |
149 |
barcode_justification_types => $barcode_justification_types, |
| 147 |
field_count => $select_text_fields_cnt, |
150 |
fields => $select_text_fields, |
| 148 |
layout_id => $layout->get_attr('layout_id') > -1 ? $layout->get_attr('layout_id') : '', |
151 |
field_count => $select_text_fields_cnt, |
| 149 |
layout_name => $layout->get_attr('layout_name'), |
152 |
layout_id => $layout->get_attr('layout_id') > -1 ? $layout->get_attr('layout_id') : '', |
| 150 |
guidebox => $layout->get_attr('guidebox'), |
153 |
layout_name => $layout->get_attr('layout_name'), |
| 151 |
oblique_title => $layout->get_attr('oblique_title'), |
154 |
guidebox => $layout->get_attr('guidebox'), |
| 152 |
font_size => $layout->get_attr('font_size'), |
155 |
oblique_title => $layout->get_attr('oblique_title'), |
| 153 |
scale_width => $layout->get_attr('scale_width'), |
156 |
font_size => $layout->get_attr('font_size'), |
| 154 |
scale_height => $layout->get_attr('scale_height'), |
157 |
scale_width => $layout->get_attr('scale_width'), |
| 155 |
callnum_split => $layout->get_attr('callnum_split'), |
158 |
scale_height => $layout->get_attr('scale_height'), |
| 156 |
format_string => $layout->get_attr('format_string'), |
159 |
callnum_split => $layout->get_attr('callnum_split'), |
|
|
160 |
format_string => $layout->get_attr('format_string'), |
| 157 |
layout_string => 1, # FIXME: This should not be hard-coded; It should perhaps be yet another syspref... CN |
161 |
layout_string => 1, # FIXME: This should not be hard-coded; It should perhaps be yet another syspref... CN |
| 158 |
); |
162 |
); |
| 159 |
output_html_with_http_headers $cgi, $cookie, $template->output; |
163 |
output_html_with_http_headers $cgi, $cookie, $template->output; |
| 160 |
- |
|
|