From 005e30ca647b7015b80be2324647dc3451acf0d4 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 24 Jun 2013 14:57:44 +0200 Subject: [PATCH] =?utf8?q?L.date=5Ftag:=20M=C3=B6glichkeit,=20"class"=20zu?= =?utf8?q?=20setzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Template/Plugin/L.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index ff507d107..ce2fa2b29 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -221,14 +221,16 @@ sub date_tag { _set_id_attribute(\%params, $name); my @onchange = $params{onchange} ? (onChange => delete $params{onchange}) : (); - my @class = $params{no_cal} || $params{readonly} ? () : (class => 'datepicker'); + my @classes = $params{no_cal} || $params{readonly} ? () : ('datepicker'); + push @classes, delete($params{class}) if $params{class}; + my %class = @classes ? (class => join(' ', @classes)) : (); return $self->input_tag( $name, blessed($value) ? $value->to_lxoffice : $value, size => 11, onblur => "check_right_date_format(this);", %params, - @class, @onchange, + %class, @onchange, ); } -- 2.20.1