Revision e3f1b7c3
Von Sven Schöling vor etwa 14 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
|
||
use base qw( Template::Plugin );
|
||
use Template::Plugin;
|
||
use List::MoreUtils qw(apply);
|
||
|
||
use strict;
|
||
|
||
... | ... | |
my %params = _hashify(@slurp);
|
||
my $name_e = _H($name);
|
||
my $seq = _tag_id();
|
||
my $datefmt = apply {
|
||
s/d+/\%d/gi;
|
||
s/m+/\%m/gi;
|
||
s/y+/\%Y/gi;
|
||
} $::myconfig{"dateformat"};
|
||
|
||
$params{cal_align} ||= 'BR';
|
||
|
||
... | ... | |
%params,
|
||
) .
|
||
$self->javascript(
|
||
"Calendar.setup({ inputField: '$name_e', ifFormat: '$::myconfig{jsc_dateformat}', align: '$params{cal_align}', button: 'trigger$seq' });"
|
||
"Calendar.setup({ inputField: '$name_e', ifFormat: '$datefmt', align: '$params{cal_align}', button: 'trigger$seq' });"
|
||
) : '');
|
||
|
||
sub javascript_tag {
|
Auch abrufbar als: Unified diff
L: date_tag muss im render modus jsc_dateformat selbst generieren.