Lines 118-135
sub build_authorized_values_list {
Link Here
|
118 |
$authorised_lib{$value} = $lib; |
118 |
$authorised_lib{$value} = $lib; |
119 |
} |
119 |
} |
120 |
} |
120 |
} |
121 |
return CGI::scrolling_list( |
121 |
return { |
122 |
-name => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield, |
122 |
type => 'select', |
123 |
-values => \@authorised_values, |
123 |
id => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield, |
124 |
-default => $value, |
124 |
name => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield, |
125 |
-labels => \%authorised_lib, |
125 |
values => \@authorised_values, |
126 |
-override => 1, |
126 |
labels => \%authorised_lib, |
127 |
-size => 1, |
127 |
default => $value, |
128 |
-multiple => 0, |
128 |
}; |
129 |
-tabindex => 1, |
|
|
130 |
-id => "tag_".$tag."_subfield_".$subfield."_".$index_tag."_".$index_subfield, |
131 |
-class => "input_marceditor", |
132 |
); |
133 |
} |
129 |
} |
134 |
|
130 |
|
135 |
|
131 |
|
Lines 209-224
sub create_input {
Link Here
|
209 |
# it's a thesaurus / authority field |
205 |
# it's a thesaurus / authority field |
210 |
} |
206 |
} |
211 |
elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) { |
207 |
elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) { |
212 |
$subfield_data{marc_value} = |
208 |
$subfield_data{marc_value} = { |
213 |
"<input type=\"text\" |
209 |
type => 'text1', |
214 |
id=\"".$subfield_data{id}."\" |
210 |
id => $subfield_data{id}, |
215 |
name=\"".$subfield_data{id}."\" |
211 |
name => $subfield_data{id}, |
216 |
value=\"$value\" |
212 |
value => $value, |
217 |
class=\"input_marceditor\" |
213 |
authtypecode => $tagslib->{$tag}->{$subfield}->{authtypecode}, |
218 |
tabindex=\"1\" \/> |
214 |
}; |
219 |
<a href=\"#\" class=\"buttonDot\" |
|
|
220 |
onclick=\"openAuth(this.parentNode.getElementsByTagName('input')[1].id,'".$tagslib->{$tag}->{$subfield}->{authtypecode}."','auth'); return false;\" tabindex=\"1\" title=\"Tag Editor\">...</a> |
221 |
"; |
222 |
# it's a plugin field |
215 |
# it's a plugin field |
223 |
} |
216 |
} |
224 |
elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) { |
217 |
elsif ( $tagslib->{$tag}->{$subfield}->{'value_builder'} ) { |
Lines 238-280
sub create_input {
Link Here
|
238 |
my ( $function_name, $javascript ) = plugin_javascript( $dbh, $rec, $tagslib, $subfield_data{id}, $tabloop ); |
231 |
my ( $function_name, $javascript ) = plugin_javascript( $dbh, $rec, $tagslib, $subfield_data{id}, $tabloop ); |
239 |
# my ( $function_name, $javascript,$extended_param ); |
232 |
# my ( $function_name, $javascript,$extended_param ); |
240 |
|
233 |
|
241 |
$subfield_data{marc_value} = |
234 |
$subfield_data{marc_value} = { |
242 |
"<input tabindex=\"1\" |
235 |
type => 'text2', |
243 |
type=\"text\" |
236 |
id => $subfield_data{id}, |
244 |
id=\"".$subfield_data{id}."\" |
237 |
name => $subfield_data{id}, |
245 |
size=\"67\" |
238 |
value => $value, |
246 |
maxlength=\"$max_length\" |
239 |
maxlength => $max_length, |
247 |
name=\"".$subfield_data{id}."\" |
240 |
function => $function_name, |
248 |
value=\"$value\" |
241 |
index_tag => $index_tag, |
249 |
class=\"input_marceditor\" |
242 |
javascript => $javascript, |
250 |
onfocus=\"Focus$function_name($index_tag)\" |
243 |
}; |
251 |
onblur=\"Blur$function_name($index_tag); \" \/> |
|
|
252 |
<a href=\"#\" class=\"buttonDot\" onclick=\"Clic$function_name('$subfield_data{id}'); return false;\" title=\"Tag Editor\">...</a> |
253 |
$javascript"; |
254 |
# it's an hidden field |
244 |
# it's an hidden field |
255 |
} |
245 |
} |
256 |
elsif ( $tag eq '' ) { |
246 |
elsif ( $tag eq '' ) { |
257 |
$subfield_data{marc_value} = |
247 |
$subfield_data{marc_value} = { |
258 |
"<input tabindex=\"1\" |
248 |
type => 'hidden', |
259 |
type=\"hidden\" |
249 |
id => $subfield_data{id}, |
260 |
id=\"".$subfield_data{id}."\" |
250 |
name => $subfield_data{id}, |
261 |
name=\"".$subfield_data{id}."\" |
251 |
value => $value, |
262 |
size=\"67\" |
252 |
maxlength => $max_length, |
263 |
maxlength=\"$max_length\" |
253 |
} |
264 |
value=\"$value\" \/> |
|
|
265 |
"; |
266 |
} |
254 |
} |
267 |
elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { |
255 |
elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { |
268 |
$subfield_data{marc_value} = |
256 |
$subfield_data{marc_value} = { |
269 |
"<input type=\"text\" |
257 |
type => 'text', |
270 |
id=\"".$subfield_data{id}."\" |
258 |
id => $subfield_data{id}, |
271 |
name=\"".$subfield_data{id}."\" |
259 |
name => $subfield_data{id}, |
272 |
class=\"input_marceditor\" |
260 |
value => $value, |
273 |
tabindex=\"1\" |
261 |
maxlength => $max_length, |
274 |
size=\"67\" |
262 |
}; |
275 |
maxlength=\"$max_length\" |
|
|
276 |
value=\"$value\" |
277 |
\/>"; |
278 |
|
263 |
|
279 |
# it's a standard field |
264 |
# it's a standard field |
280 |
} |
265 |
} |
Lines 289-318
sub create_input {
Link Here
|
289 |
&& C4::Context->preference("marcflavour") eq "MARC21" ) |
274 |
&& C4::Context->preference("marcflavour") eq "MARC21" ) |
290 |
) |
275 |
) |
291 |
{ |
276 |
{ |
292 |
$subfield_data{marc_value} = |
277 |
$subfield_data{marc_value} = { |
293 |
"<textarea cols=\"70\" |
278 |
type => 'textarea', |
294 |
rows=\"4\" |
279 |
id => $subfield_data{id}, |
295 |
id=\"".$subfield_data{id}."\" |
280 |
name => $subfield_data{id}, |
296 |
name=\"".$subfield_data{id}."\" |
281 |
value => $value, |
297 |
class=\"input_marceditor\" |
282 |
maxlength => $max_length, |
298 |
tabindex=\"1\" |
283 |
}; |
299 |
size=\"67\" |
284 |
|
300 |
maxlength=\"$max_length\" |
|
|
301 |
>$value</textarea> |
302 |
"; |
303 |
} |
285 |
} |
304 |
else { |
286 |
else { |
305 |
$subfield_data{marc_value} = |
287 |
$subfield_data{marc_value} = { |
306 |
"<input type=\"text\" |
288 |
type => 'text', |
307 |
id=\"".$subfield_data{id}."\" |
289 |
id => $subfield_data{id}, |
308 |
name=\"".$subfield_data{id}."\" |
290 |
name => $subfield_data{id}, |
309 |
value=\"$value\" |
291 |
value => $value, |
310 |
tabindex=\"1\" |
292 |
maxlength => $max_length, |
311 |
size=\"67\" |
293 |
}; |
312 |
maxlength=\"$max_length\" |
294 |
|
313 |
class=\"input_marceditor\" |
|
|
314 |
\/> |
315 |
"; |
316 |
} |
295 |
} |
317 |
} |
296 |
} |
318 |
$subfield_data{'index_subfield'} = $index_subfield; |
297 |
$subfield_data{'index_subfield'} = $index_subfield; |
Lines 538-544
sub build_hidden_data {
Link Here
|
538 |
$subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib}; |
517 |
$subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib}; |
539 |
$subfield_data{marc_mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory}; |
518 |
$subfield_data{marc_mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory}; |
540 |
$subfield_data{marc_repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable}; |
519 |
$subfield_data{marc_repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable}; |
541 |
$subfield_data{marc_value}="<input type=\"hidden\" name=\"field_value[]\">"; |
520 |
$subfield_data{marc_value} = { |
|
|
521 |
type => 'hidden_simple', |
522 |
name => 'field_value[]', |
523 |
}; |
542 |
push(@loop_data, \%subfield_data); |
524 |
push(@loop_data, \%subfield_data); |
543 |
$i++ |
525 |
$i++ |
544 |
} |
526 |
} |