View | Details | Raw Unified | Return to bug 15030
Collapse All | Expand All

(-)a/C4/Items.pm (-3 / +5 lines)
Lines 3058-3072 sub PrepareItemrecordDisplay { Link Here
3058
                    });
3058
                    });
3059
                    my $pars = { dbh => $dbh, record => undef, tagslib =>$tagslib, id => $subfield_data{id}, tabloop => undef };
3059
                    my $pars = { dbh => $dbh, record => undef, tagslib =>$tagslib, id => $subfield_data{id}, tabloop => undef };
3060
                    $plugin->build( $pars );
3060
                    $plugin->build( $pars );
3061
                    if ( $itemrecord and my $field = $itemrecord->field($tag) ) {
3062
                        $defaultvalue = $field->subfield($subfield);
3063
                    }
3061
                    if( !$plugin->errstr ) {
3064
                    if( !$plugin->errstr ) {
3062
                        #TODO Move html to template; see report 12176/13397
3065
                        #TODO Move html to template; see report 12176/13397
3063
                        my $tab= $plugin->noclick? '-1': '';
3066
                        my $tab= $plugin->noclick? '-1': '';
3064
                        my $class= $plugin->noclick? ' disabled': '';
3067
                        my $class= $plugin->noclick? ' disabled': '';
3065
                        my $title= $plugin->noclick? 'No popup': 'Tag editor';
3068
                        my $title= $plugin->noclick? 'No popup': 'Tag editor';
3066
                        $subfield_data{marc_value} = qq[<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" /><a href="#" id="buttonDot_$subfield_data{id}" tabindex="$tab" class="buttonDot $class" title="$title">...</a>\n].$plugin->javascript;
3069
                        $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;
3067
                    } else {
3070
                    } else {
3068
                        warn $plugin->errstr;
3071
                        warn $plugin->errstr;
3069
                        $subfield_data{marc_value} = qq(<input type="text" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="50" maxlength="255" />); # supply default input form
3072
                        $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
3070
                    }
3073
                    }
3071
                }
3074
                }
3072
                elsif ( $tag eq '' ) {       # it's an hidden field
3075
                elsif ( $tag eq '' ) {       # it's an hidden field
3073
- 

Return to bug 15030