From: Moritz Bunkus Date: Mon, 24 Jun 2013 12:57:44 +0000 (+0200) Subject: L.date_tag: Möglichkeit, "class" zu setzen X-Git-Tag: release-3.1.0beta1~307 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=005e30ca647b7015b80be2324647dc3451acf0d4;p=kivitendo-erp.git L.date_tag: Möglichkeit, "class" zu setzen --- 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, ); }