|
Lines 288-295
sub create_input {
Link Here
|
| 288 |
|
288 |
|
| 289 |
my $index_subfield = CreateKey(); # create a specifique key for each subfield |
289 |
my $index_subfield = CreateKey(); # create a specifique key for each subfield |
| 290 |
|
290 |
|
| 291 |
# if there is no value provided but a default value in parameters, get it |
291 |
# Apply optional framework default value when it is a new record |
| 292 |
if ( $value eq '' ) { |
292 |
# Substitute date parts, user name |
|
|
293 |
if ( $value eq '' && !$cgi->param('biblionumber') ) { |
| 293 |
$value = $tagslib->{$tag}->{$subfield}->{defaultvalue} // q{}; |
294 |
$value = $tagslib->{$tag}->{$subfield}->{defaultvalue} // q{}; |
| 294 |
|
295 |
|
| 295 |
# get today date & replace <<YYYY>>, <<YY>>, <<MM>>, <<DD>> if provided in the default value |
296 |
# get today date & replace <<YYYY>>, <<YY>>, <<MM>>, <<DD>> if provided in the default value |
|
Lines 305-312
sub create_input {
Link Here
|
| 305 |
# And <<USER>> with surname (?) |
306 |
# And <<USER>> with surname (?) |
| 306 |
my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); |
307 |
my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); |
| 307 |
$value=~s/<<USER>>/$username/g; |
308 |
$value=~s/<<USER>>/$username/g; |
| 308 |
|
|
|
| 309 |
} |
309 |
} |
|
|
310 |
|
| 310 |
my $dbh = C4::Context->dbh; |
311 |
my $dbh = C4::Context->dbh; |
| 311 |
|
312 |
|
| 312 |
# map '@' as "subfield" label for fixed fields |
313 |
# map '@' as "subfield" label for fixed fields |
| 313 |
- |
|
|