|
Lines 179-184
if ( $op eq 'add_form' ) {
Link Here
|
| 179 |
while ( $data = $sth->fetchrow_hashref ) { |
179 |
while ( $data = $sth->fetchrow_hashref ) { |
| 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{tab} = CGI::scrolling_list( |
183 |
$row_data{tab} = CGI::scrolling_list( |
| 183 |
-name => 'tab', |
184 |
-name => 'tab', |
| 184 |
-id => "tab$i", |
185 |
-id => "tab$i", |
|
Lines 386-396
elsif ( $op eq 'add_validate' ) {
Link Here
|
| 386 |
# values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" |
387 |
# values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" |
| 387 |
# ); |
388 |
# ); |
| 388 |
my $sth_insert = $dbh->prepare(qq{ |
389 |
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) |
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) |
| 390 |
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) |
391 |
values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) |
| 391 |
}); |
392 |
}); |
| 392 |
my $sth_update = $dbh->prepare(qq{ |
393 |
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=? |
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=? |
| 394 |
where tagfield=? and tagsubfield=? and frameworkcode=? |
395 |
where tagfield=? and tagsubfield=? and frameworkcode=? |
| 395 |
}); |
396 |
}); |
| 396 |
my @tagsubfield = $input->param('tagsubfield'); |
397 |
my @tagsubfield = $input->param('tagsubfield'); |
|
Lines 405-410
elsif ( $op eq 'add_validate' ) {
Link Here
|
| 405 |
my @value_builder = $input->param('value_builder'); |
406 |
my @value_builder = $input->param('value_builder'); |
| 406 |
my @link = $input->param('link'); |
407 |
my @link = $input->param('link'); |
| 407 |
my @defaultvalue = $input->param('defaultvalue'); |
408 |
my @defaultvalue = $input->param('defaultvalue'); |
|
|
409 |
my @maxlength = $input->param('maxlength'); |
| 408 |
|
410 |
|
| 409 |
for ( my $i = 0 ; $i <= $#tagsubfield ; $i++ ) { |
411 |
for ( my $i = 0 ; $i <= $#tagsubfield ; $i++ ) { |
| 410 |
my $tagfield = $input->param('tagfield'); |
412 |
my $tagfield = $input->param('tagfield'); |
|
Lines 425-430
elsif ( $op eq 'add_validate' ) {
Link Here
|
| 425 |
my $isurl = $input->param("isurl$i") ? 1 : 0; |
427 |
my $isurl = $input->param("isurl$i") ? 1 : 0; |
| 426 |
my $link = $link[$i]; |
428 |
my $link = $link[$i]; |
| 427 |
my $defaultvalue = $defaultvalue[$i]; |
429 |
my $defaultvalue = $defaultvalue[$i]; |
|
|
430 |
my $maxlength = $maxlength[$i]; |
| 428 |
|
431 |
|
| 429 |
if (defined($liblibrarian) && $liblibrarian ne "") { |
432 |
if (defined($liblibrarian) && $liblibrarian ne "") { |
| 430 |
unless ( C4::Context->config('demo') eq 1 ) { |
433 |
unless ( C4::Context->config('demo') eq 1 ) { |
|
Lines 447-452
elsif ( $op eq 'add_validate' ) {
Link Here
|
| 447 |
$frameworkcode, |
450 |
$frameworkcode, |
| 448 |
$link, |
451 |
$link, |
| 449 |
$defaultvalue, |
452 |
$defaultvalue, |
|
|
453 |
$maxlength, |
| 450 |
( |
454 |
( |
| 451 |
$tagfield, |
455 |
$tagfield, |
| 452 |
$tagsubfield, |
456 |
$tagsubfield, |
|
Lines 472-477
elsif ( $op eq 'add_validate' ) {
Link Here
|
| 472 |
$frameworkcode, |
476 |
$frameworkcode, |
| 473 |
$link, |
477 |
$link, |
| 474 |
$defaultvalue, |
478 |
$defaultvalue, |
|
|
479 |
$maxlength, |
| 475 |
); |
480 |
); |
| 476 |
} |
481 |
} |
| 477 |
} |
482 |
} |