Lines 130-140
sub generate_subfield_form {
Link Here
|
130 |
$value = $subfieldlib->{defaultvalue}; |
130 |
$value = $subfieldlib->{defaultvalue}; |
131 |
# get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value |
131 |
# get today date & replace <<YYYY>>, <<MM>>, <<DD>> if provided in the default value |
132 |
my $today_dt = dt_from_string; |
132 |
my $today_dt = dt_from_string; |
133 |
my $year = $today_dt->year; |
133 |
my $year = $today_dt->strftime('%Y'); |
134 |
my $month = $today_dt->month; |
134 |
my $month = $today_dt->strftime('%m'); |
135 |
my $day = $today_dt->day; |
135 |
my $day = $today_dt->strftime('%d'); |
136 |
$value =~ s/<<YYYY>>/$year/g; |
136 |
$value =~ s/<<YYYY>>/$year/g; |
137 |
$value =~ s/<<MM></$month/g; |
137 |
$value =~ s/<<MM>>/$month/g; |
138 |
$value =~ s/<<DD>>/$day/g; |
138 |
$value =~ s/<<DD>>/$day/g; |
139 |
# And <<USER>> with surname (?) |
139 |
# And <<USER>> with surname (?) |
140 |
my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); |
140 |
my $username=(C4::Context->userenv?C4::Context->userenv->{'surname'}:"superlibrarian"); |
141 |
- |
|
|