Lines 274-287
if ( $op eq 'add_form' ) {
Link Here
|
274 |
} |
274 |
} |
275 |
|
275 |
|
276 |
# add more_subfields empty lines for add if needed |
276 |
# add more_subfields empty lines for add if needed |
277 |
for ( my $j = 1 ; $j <= 1 ; $j++ ) { |
|
|
278 |
my %row_data; # get a fresh hash for the row data |
277 |
my %row_data; # get a fresh hash for the row data |
279 |
$row_data{'new_subfield'} = 1; |
278 |
$row_data{'new_subfield'} = 1; |
280 |
$row_data{'subfieldcode'} = ''; |
279 |
$row_data{'subfieldcode'} = ''; |
281 |
|
280 |
|
282 |
$row_data{tab} = CGI::scrolling_list( |
281 |
$row_data{tab} = CGI::scrolling_list( |
283 |
-name => 'tab', |
282 |
-name => 'tab', |
284 |
-id => "tab$j", |
283 |
-id => "tab$i", |
285 |
-values => |
284 |
-values => |
286 |
[ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ], |
285 |
[ '-1', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ], |
287 |
-labels => { |
286 |
-labels => { |
Lines 311-317
if ( $op eq 'add_form' ) {
Link Here
|
311 |
$row_data{seealso} = ""; |
310 |
$row_data{seealso} = ""; |
312 |
$row_data{kohafield} = CGI::scrolling_list( |
311 |
$row_data{kohafield} = CGI::scrolling_list( |
313 |
-name => 'kohafield', |
312 |
-name => 'kohafield', |
314 |
-id => "kohafield$j", |
313 |
-id => "kohafield$i", |
315 |
-values => \@kohafields, |
314 |
-values => \@kohafields, |
316 |
-default => "", |
315 |
-default => "", |
317 |
-size => 1, |
316 |
-size => 1, |
Lines 319-347
if ( $op eq 'add_form' ) {
Link Here
|
319 |
); |
318 |
); |
320 |
$row_data{hidden} = ""; |
319 |
$row_data{hidden} = ""; |
321 |
$row_data{repeatable} = CGI::checkbox( |
320 |
$row_data{repeatable} = CGI::checkbox( |
322 |
-name => "repeatable$j", |
321 |
-name => "repeatable$i", |
323 |
-id => "repeatable$j", |
322 |
-id => "repeatable$i", |
324 |
-checked => '', |
323 |
-checked => '', |
325 |
-value => 1, |
324 |
-value => 1, |
326 |
-label => '' |
325 |
-label => '' |
327 |
); |
326 |
); |
328 |
$row_data{mandatory} = CGI::checkbox( |
327 |
$row_data{mandatory} = CGI::checkbox( |
329 |
-name => "mandatory$j", |
328 |
-name => "mandatory$i", |
330 |
-id => "mandatory$j", |
329 |
-id => "mandatory$i", |
331 |
-checked => '', |
330 |
-checked => '', |
332 |
-value => 1, |
331 |
-value => 1, |
333 |
-label => '' |
332 |
-label => '' |
334 |
); |
333 |
); |
335 |
$row_data{isurl} = CGI::checkbox( |
334 |
$row_data{isurl} = CGI::checkbox( |
336 |
-name => "isurl$j", |
335 |
-name => "isurl$i", |
337 |
-id => "isurl$j", |
336 |
-id => "isurl$i", |
338 |
-checked => '', |
337 |
-checked => '', |
339 |
-value => 1, |
338 |
-value => 1, |
340 |
-label => '' |
339 |
-label => '' |
341 |
); |
340 |
); |
342 |
$row_data{value_builder} = CGI::scrolling_list( |
341 |
$row_data{value_builder} = CGI::scrolling_list( |
343 |
-name => "value_builder", |
342 |
-name => "value_builder", |
344 |
-id => "value_builder$j", |
343 |
-id => "value_builder$i", |
345 |
-values => \@value_builder, |
344 |
-values => \@value_builder, |
346 |
-default => $data->{'value_builder'}, |
345 |
-default => $data->{'value_builder'}, |
347 |
-size => 1, |
346 |
-size => 1, |
Lines 349-370
if ( $op eq 'add_form' ) {
Link Here
|
349 |
); |
348 |
); |
350 |
$row_data{authorised_value} = CGI::scrolling_list( |
349 |
$row_data{authorised_value} = CGI::scrolling_list( |
351 |
-name => "authorised_value", |
350 |
-name => "authorised_value", |
352 |
-id => "authorised_value$j", |
351 |
-id => "authorised_value$i", |
353 |
-values => \@authorised_values, |
352 |
-values => \@authorised_values, |
354 |
-size => 1, |
353 |
-size => 1, |
355 |
-multiple => 0, |
354 |
-multiple => 0, |
356 |
); |
355 |
); |
357 |
$row_data{authtypes} = CGI::scrolling_list( |
356 |
$row_data{authtypes} = CGI::scrolling_list( |
358 |
-name => "authtypecode", |
357 |
-name => "authtypecode", |
359 |
-id => "authtypecode$j", |
358 |
-id => "authtypecode$i", |
360 |
-values => \@authtypes, |
359 |
-values => \@authtypes, |
361 |
-size => 1, |
360 |
-size => 1, |
362 |
-multiple => 0, |
361 |
-multiple => 0, |
363 |
); |
362 |
); |
364 |
$row_data{link} = CGI::escapeHTML( $data->{'link'} ); |
363 |
$row_data{link} = CGI::escapeHTML( $data->{'link'} ); |
365 |
$row_data{row} = $j; |
364 |
$row_data{row} = $i; |
366 |
push( @loop_data, \%row_data ); |
365 |
push( @loop_data, \%row_data ); |
367 |
} |
366 |
|
368 |
$template->param( 'use_heading_flags_p' => 1 ); |
367 |
$template->param( 'use_heading_flags_p' => 1 ); |
369 |
$template->param( 'heading_edit_subfields_p' => 1 ); |
368 |
$template->param( 'heading_edit_subfields_p' => 1 ); |
370 |
$template->param( |
369 |
$template->param( |