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