Revision e3f1b7c3
Von Sven Schöling vor fast 14 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
2 | 2 |
|
3 | 3 |
use base qw( Template::Plugin ); |
4 | 4 |
use Template::Plugin; |
5 |
use List::MoreUtils qw(apply); |
|
5 | 6 |
|
6 | 7 |
use strict; |
7 | 8 |
|
... | ... | |
193 | 194 |
my %params = _hashify(@slurp); |
194 | 195 |
my $name_e = _H($name); |
195 | 196 |
my $seq = _tag_id(); |
197 |
my $datefmt = apply { |
|
198 |
s/d+/\%d/gi; |
|
199 |
s/m+/\%m/gi; |
|
200 |
s/y+/\%Y/gi; |
|
201 |
} $::myconfig{"dateformat"}; |
|
196 | 202 |
|
197 | 203 |
$params{cal_align} ||= 'BR'; |
198 | 204 |
|
... | ... | |
210 | 216 |
%params, |
211 | 217 |
) . |
212 | 218 |
$self->javascript( |
213 |
"Calendar.setup({ inputField: '$name_e', ifFormat: '$::myconfig{jsc_dateformat}', align: '$params{cal_align}', button: 'trigger$seq' });"
|
|
219 |
"Calendar.setup({ inputField: '$name_e', ifFormat: '$datefmt', align: '$params{cal_align}', button: 'trigger$seq' });"
|
|
214 | 220 |
) : ''); |
215 | 221 |
|
216 | 222 |
sub javascript_tag { |
Auch abrufbar als: Unified diff
L: date_tag muss im render modus jsc_dateformat selbst generieren.