X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/efb9a24f2252104ab4af5c25334119d7c5c70a8c..1c62d23ef8305ca67a7cf19f69d4fb2939f972a0:/SL/Template/Plugin/L.pm diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 241141625..8cc93a673 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -121,6 +121,7 @@ sub radio_button_tag { _set_id_attribute(\%attributes, $name); $attributes{value} = 1 unless exists $attributes{value}; + $attributes{id} .= '_' . $attributes{value}; my $label = delete $attributes{label}; if ($attributes{checked}) { @@ -241,7 +242,7 @@ sub date_tag { } sub customer_picker { - my ($self, $name, $value, %params) = @_; + my ($self, $name, $value, %params) = _hashify(3, @_); my $name_e = _H($name); $::request->{layout}->add_javascripts('autocomplete_customer.js'); @@ -252,7 +253,7 @@ sub customer_picker { # simple version with select_tag sub vendor_selector { - my ($self, $name, $value, %params) = @_; + my ($self, $name, $value, %params) = _hashify(3, @_); my $actual_vendor_id = (defined $::form->{"$name"})? ((ref $::form->{"$name"}) ? $::form->{"$name"}->id : $::form->{"$name"}) : (ref $value && $value->can('id')) ? $value->id : ''; @@ -267,7 +268,7 @@ sub vendor_selector { # simple version with select_tag sub part_selector { - my ($self, $name, $value, %params) = @_; + my ($self, $name, $value, %params) = _hashify(3, @_); my $actual_part_id = (defined $::form->{"$name"})? ((ref $::form->{"$name"})? $::form->{"$name"}->id : $::form->{"$name"}) : (ref $value && $value->can('id')) ? $value->id : ''; @@ -344,19 +345,14 @@ sub tab { sub areainput_tag { my ($self, $name, $value, %attributes) = _hashify(3, @_); - my ($rows, $cols); - my $min = delete $attributes{min_rows} || 1; - - if (exists $attributes{cols}) { - $cols = delete $attributes{cols}; - $rows = $::form->numtextrows($value, $cols); - } else { - $rows = delete $attributes{rows} || 1; - } + my $cols = delete $attributes{cols} || delete $attributes{size}; + my $minrows = delete $attributes{min_rows} || 1; + my $maxrows = delete $attributes{max_rows}; + my $rows = $::form->numtextrows($value, $cols, $maxrows, $minrows); return $rows > 1 - ? $self->textarea_tag($name, $value, %attributes, rows => max($rows, $min), ($cols ? (cols => $cols) : ())) - : $self->input_tag($name, $value, %attributes, ($cols ? (size => $cols) : ())); + ? $self->textarea_tag($name, $value, %attributes, rows => $rows, cols => $cols) + : $self->input_tag($name, $value, %attributes, size => $cols); } sub multiselect2side {