From: Moritz Bunkus Date: Mon, 27 Dec 2010 12:44:06 +0000 (+0100) Subject: select_tag: Automatischer Aufruf von options_for_select falls Optionen-Argument kein... X-Git-Tag: release-2.6.2beta1~64^2~35 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=368f96119b7f843805453943cd1206afefd5cd72;p=kivitendo-erp.git select_tag: Automatischer Aufruf von options_for_select falls Optionen-Argument kein String ist --- diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index d9fd3c1f5..ec0c2d02f 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -71,6 +71,7 @@ sub select_tag { my %attributes = _hashify(@_); $attributes{id} ||= $self->name_to_id($name); + $options_str = $self->options_for_select($options_str) if ref $options_str; return $self->html_tag('select', $options_str, %attributes, name => $name); } @@ -280,8 +281,10 @@ Creates a HTML 'select' tag named C<$name> with the contents C<$options_string> and with arbitrary HTML attributes from C<%attributes>. The tag's C defaults to C. -The $options_string is usually created by the C -function. +The C<$options_string> is usually created by the +L function. If C<$options_string> is an array +reference then it will be passed to L +automatically. =item C