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

(-)a/authorities/authorities.pl (-7 / +9 lines)
Lines 152-160 sub create_input { Link Here
152
        $value =~ s/DD/$day/g;
152
        $value =~ s/DD/$day/g;
153
    }
153
    }
154
    my $dbh = C4::Context->dbh;
154
    my $dbh = C4::Context->dbh;
155
156
    # map '@' as "subfield" label for fixed fields
157
    # to something that's allowed in a div id.
158
    my $id_subfield = $subfield;
159
    $id_subfield = "00" if $id_subfield eq "@";
160
155
    my %subfield_data = (
161
    my %subfield_data = (
156
        tag        => $tag,
162
        tag        => $tag,
157
        subfield   => $subfield,
163
        subfield   => $id_subfield,
158
        marc_lib   => substr( $tagslib->{$tag}->{$subfield}->{lib}, 0, 22 ),
164
        marc_lib   => substr( $tagslib->{$tag}->{$subfield}->{lib}, 0, 22 ),
159
        marc_lib_plain => $tagslib->{$tag}->{$subfield}->{lib}, 
165
        marc_lib_plain => $tagslib->{$tag}->{$subfield}->{lib}, 
160
        tag_mandatory  => $tagslib->{$tag}->{mandatory},
166
        tag_mandatory  => $tagslib->{$tag}->{mandatory},
Lines 162-175 sub create_input { Link Here
162
        repeatable     => $tagslib->{$tag}->{$subfield}->{repeatable},
168
        repeatable     => $tagslib->{$tag}->{$subfield}->{repeatable},
163
        kohafield      => $tagslib->{$tag}->{$subfield}->{kohafield},
169
        kohafield      => $tagslib->{$tag}->{$subfield}->{kohafield},
164
        index          => $index_tag,
170
        index          => $index_tag,
165
        id             => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield,
171
        id             => "tag_".$tag."_subfield_".$id_subfield."_".$index_tag."_".$index_subfield,
166
        value          => $value,
172
        value          => $value,
173
        random         => CreateKey(),
167
    );
174
    );
168
    if($subfield eq '@'){
169
        $subfield_data{id} = "tag_".$tag."_subfield_00_".$index_tag."_".$index_subfield;
170
    } else {
171
        $subfield_data{id} = "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield;
172
    }
173
175
174
    if(exists $mandatory_z3950->{$tag.$subfield}){
176
    if(exists $mandatory_z3950->{$tag.$subfield}){
175
        $subfield_data{z3950_mandatory} = $mandatory_z3950->{$tag.$subfield};
177
        $subfield_data{z3950_mandatory} = $mandatory_z3950->{$tag.$subfield};
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js (-1 / +4 lines)
Lines 211-216 function CloneField(index, hideMarc, advancedMARCEditor) { Link Here
211
211
212
        } else { // it's a indicator div
212
        } else { // it's a indicator div
213
            if(divs[i].getAttribute('id').match(/^div_indicator/)){
213
            if(divs[i].getAttribute('id').match(/^div_indicator/)){
214
215
                // setting a new id for the indicator div
216
                divs[i].setAttribute('id',divs[i].getAttribute('id')+new_key);
217
214
                var inputs = divs[i].getElementsByTagName('input');
218
                var inputs = divs[i].getElementsByTagName('input');
215
                inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
219
                inputs[0].setAttribute('id',inputs[0].getAttribute('id')+new_key);
216
                inputs[1].setAttribute('id',inputs[1].getAttribute('id')+new_key);
220
                inputs[1].setAttribute('id',inputs[1].getAttribute('id')+new_key);
217
- 

Return to bug 7455