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}; |