Lines 307-319
sub create_input {
Link Here
|
307 |
|
307 |
|
308 |
# get today date & replace YYYY, MM, DD if provided in the default value |
308 |
# get today date & replace YYYY, MM, DD if provided in the default value |
309 |
my ( $year, $month, $day ) = Today(); |
309 |
my ( $year, $month, $day ) = Today(); |
|
|
310 |
my $shortyear = substr $year, 2, 2; |
310 |
$month = sprintf( "%02d", $month ); |
311 |
$month = sprintf( "%02d", $month ); |
311 |
$day = sprintf( "%02d", $day ); |
312 |
$day = sprintf( "%02d", $day ); |
312 |
$value =~ s/YYYY/$year/g; |
313 |
$value =~ s/YYYY/$year/g; |
|
|
314 |
$value =~ s/YY/$shortyear/g; |
313 |
$value =~ s/MM/$month/g; |
315 |
$value =~ s/MM/$month/g; |
314 |
$value =~ s/DD/$day/g; |
316 |
$value =~ s/DD/$day/g; |
315 |
my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); |
317 |
my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); |
316 |
$value=~s/user/$username/g; |
318 |
$value=~s/USER/$username/g; |
317 |
|
319 |
|
318 |
} |
320 |
} |
319 |
my $dbh = C4::Context->dbh; |
321 |
my $dbh = C4::Context->dbh; |