Lines 2464-2469
sub PrepareItemrecordDisplay {
Link Here
|
2464 |
$defaultvalue =~ s/"/"/g; |
2464 |
$defaultvalue =~ s/"/"/g; |
2465 |
} |
2465 |
} |
2466 |
|
2466 |
|
|
|
2467 |
my $maxlength = $tagslib->{$tag}->{$subfield}->{maxlength}; |
2468 |
|
2467 |
# search for itemcallnumber if applicable |
2469 |
# search for itemcallnumber if applicable |
2468 |
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' |
2470 |
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' |
2469 |
&& C4::Context->preference('itemcallnumber') ) { |
2471 |
&& C4::Context->preference('itemcallnumber') ) { |
Lines 2601-2617
sub PrepareItemrecordDisplay {
Link Here
|
2601 |
my $tab= $plugin->noclick? '-1': ''; |
2603 |
my $tab= $plugin->noclick? '-1': ''; |
2602 |
my $class= $plugin->noclick? ' disabled': ''; |
2604 |
my $class= $plugin->noclick? ' disabled': ''; |
2603 |
my $title= $plugin->noclick? 'No popup': 'Tag editor'; |
2605 |
my $title= $plugin->noclick? 'No popup': 'Tag editor'; |
2604 |
$subfield_data{marc_value} = qq[<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" value="$defaultvalue" /><a href="#" id="buttonDot_$subfield_data{id}" tabindex="$tab" class="buttonDot $class" title="$title">...</a>\n].$plugin->javascript; |
2606 |
$subfield_data{marc_value} = qq[<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$maxlength" value="$defaultvalue" /><a href="#" id="buttonDot_$subfield_data{id}" tabindex="$tab" class="buttonDot $class" title="$title">...</a>\n].$plugin->javascript; |
2605 |
} else { |
2607 |
} else { |
2606 |
warn $plugin->errstr; |
2608 |
warn $plugin->errstr; |
2607 |
$subfield_data{marc_value} = qq(<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" value="$defaultvalue" />); # supply default input form |
2609 |
$subfield_data{marc_value} = qq(<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$maxlength" value="$defaultvalue" />); # supply default input form |
2608 |
} |
2610 |
} |
2609 |
} |
2611 |
} |
2610 |
elsif ( $tag eq '' ) { # it's an hidden field |
2612 |
elsif ( $tag eq '' ) { # it's an hidden field |
2611 |
$subfield_data{marc_value} = qq(<input type="hidden" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" value="$defaultvalue" />); |
2613 |
$subfield_data{marc_value} = qq(<input type="hidden" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$maxlength" value="$defaultvalue" />); |
2612 |
} |
2614 |
} |
2613 |
elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { # FIXME: shouldn't input type be "hidden" ? |
2615 |
elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { # FIXME: shouldn't input type be "hidden" ? |
2614 |
$subfield_data{marc_value} = qq(<input type="text" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" value="$defaultvalue" />); |
2616 |
$subfield_data{marc_value} = qq(<input type="text" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$maxlength" value="$defaultvalue" />); |
2615 |
} |
2617 |
} |
2616 |
elsif ( length($defaultvalue) > 100 |
2618 |
elsif ( length($defaultvalue) > 100 |
2617 |
or (C4::Context->preference("marcflavour") eq "UNIMARC" and |
2619 |
or (C4::Context->preference("marcflavour") eq "UNIMARC" and |
Lines 2620-2628
sub PrepareItemrecordDisplay {
Link Here
|
2620 |
500 <= $tag && $tag < 600 ) |
2622 |
500 <= $tag && $tag < 600 ) |
2621 |
) { |
2623 |
) { |
2622 |
# oversize field (textarea) |
2624 |
# oversize field (textarea) |
2623 |
$subfield_data{marc_value} = qq(<textarea tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255">$defaultvalue</textarea>\n"); |
2625 |
$subfield_data{marc_value} = qq(<textarea tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="$maxlength">$defaultvalue</textarea>\n"); |
2624 |
} else { |
2626 |
} else { |
2625 |
$subfield_data{marc_value} = "<input type=\"text\" name=\"field_value\" value=\"$defaultvalue\" size=\"50\" maxlength=\"255\" />"; |
2627 |
$subfield_data{marc_value} = "<input type=\"text\" name=\"field_value\" value=\"$defaultvalue\" size=\"50\" maxlength=\"$maxlength\" />"; |
2626 |
} |
2628 |
} |
2627 |
push( @loop_data, \%subfield_data ); |
2629 |
push( @loop_data, \%subfield_data ); |
2628 |
} |
2630 |
} |
2629 |
- |
|
|