Lines 180-185
if ( $op eq 'add_form' ) {
Link Here
|
180 |
my %row_data; # get a fresh hash for the row data |
180 |
my %row_data; # get a fresh hash for the row data |
181 |
$row_data{defaultvalue} = $data->{defaultvalue}; |
181 |
$row_data{defaultvalue} = $data->{defaultvalue}; |
182 |
$row_data{maxlength} = $data->{maxlength}; |
182 |
$row_data{maxlength} = $data->{maxlength}; |
|
|
183 |
$row_data{punctuation} = $data->{'punctuation'}; |
184 |
$row_data{help} = CGI::escapeHTML( $data->{'help'} ); |
183 |
$row_data{tab} = CGI::scrolling_list( |
185 |
$row_data{tab} = CGI::scrolling_list( |
184 |
-name => 'tab', |
186 |
-name => 'tab', |
185 |
-id => "tab$i", |
187 |
-id => "tab$i", |
Lines 386-396
elsif ( $op eq 'add_validate' ) {
Link Here
|
386 |
# values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" |
388 |
# values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" |
387 |
# ); |
389 |
# ); |
388 |
my $sth_insert = $dbh->prepare(qq{ |
390 |
my $sth_insert = $dbh->prepare(qq{ |
389 |
insert into marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,authtypecode,value_builder,hidden,isurl,frameworkcode, link,defaultvalue,maxlength) |
391 |
insert into marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,authtypecode,value_builder,hidden,isurl,frameworkcode, link,defaultvalue,maxlength,punctuation,help) |
390 |
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) |
392 |
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) |
391 |
}); |
393 |
}); |
392 |
my $sth_update = $dbh->prepare(qq{ |
394 |
my $sth_update = $dbh->prepare(qq{ |
393 |
update marc_subfield_structure set tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?, seealso=?, authorised_value=?, authtypecode=?, value_builder=?, hidden=?, isurl=?, frameworkcode=?, link=?, defaultvalue=?, maxlength=? |
395 |
update marc_subfield_structure set tagfield=?, tagsubfield=?, liblibrarian=?, libopac=?, repeatable=?, mandatory=?, kohafield=?, tab=?, seealso=?, authorised_value=?, authtypecode=?, value_builder=?, hidden=?, isurl=?, frameworkcode=?, link=?, defaultvalue=?, maxlength=?, punctuation=?, help=? |
394 |
where tagfield=? and tagsubfield=? and frameworkcode=? |
396 |
where tagfield=? and tagsubfield=? and frameworkcode=? |
395 |
}); |
397 |
}); |
396 |
my @tagsubfield = $input->param('tagsubfield'); |
398 |
my @tagsubfield = $input->param('tagsubfield'); |
Lines 406-411
elsif ( $op eq 'add_validate' ) {
Link Here
|
406 |
my @link = $input->param('link'); |
408 |
my @link = $input->param('link'); |
407 |
my @defaultvalue = $input->param('defaultvalue'); |
409 |
my @defaultvalue = $input->param('defaultvalue'); |
408 |
my @maxlength = $input->param('maxlength'); |
410 |
my @maxlength = $input->param('maxlength'); |
|
|
411 |
my @punctuation = $input->param('punctuation'); |
412 |
my @help = $input->param('help'); |
409 |
|
413 |
|
410 |
for ( my $i = 0 ; $i <= $#tagsubfield ; $i++ ) { |
414 |
for ( my $i = 0 ; $i <= $#tagsubfield ; $i++ ) { |
411 |
my $tagfield = $input->param('tagfield'); |
415 |
my $tagfield = $input->param('tagfield'); |
Lines 427-432
elsif ( $op eq 'add_validate' ) {
Link Here
|
427 |
my $link = $link[$i]; |
431 |
my $link = $link[$i]; |
428 |
my $defaultvalue = $defaultvalue[$i]; |
432 |
my $defaultvalue = $defaultvalue[$i]; |
429 |
my $maxlength = $maxlength[$i]; |
433 |
my $maxlength = $maxlength[$i]; |
|
|
434 |
my $punctuation = $punctuation[$i]; |
435 |
my $help = $help[$i]; |
430 |
|
436 |
|
431 |
if (defined($liblibrarian) && $liblibrarian ne "") { |
437 |
if (defined($liblibrarian) && $liblibrarian ne "") { |
432 |
unless ( C4::Context->config('demo') eq 1 ) { |
438 |
unless ( C4::Context->config('demo') eq 1 ) { |
Lines 450-455
elsif ( $op eq 'add_validate' ) {
Link Here
|
450 |
$link, |
456 |
$link, |
451 |
$defaultvalue, |
457 |
$defaultvalue, |
452 |
$maxlength, |
458 |
$maxlength, |
|
|
459 |
$punctuation, |
460 |
$help, |
453 |
( |
461 |
( |
454 |
$tagfield, |
462 |
$tagfield, |
455 |
$tagsubfield, |
463 |
$tagsubfield, |
Lines 476-481
elsif ( $op eq 'add_validate' ) {
Link Here
|
476 |
$link, |
484 |
$link, |
477 |
$defaultvalue, |
485 |
$defaultvalue, |
478 |
$maxlength, |
486 |
$maxlength, |
|
|
487 |
$punctuation, |
488 |
$help, |
479 |
); |
489 |
); |
480 |
} |
490 |
} |
481 |
} |
491 |
} |