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