]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Template/Plugin/L.pm
Steuerzone - Default eingeführt (statt id 0)
[mfinanz.git] / SL / Template / Plugin / L.pm
index 241141625f1984caa9d99286e2cc14bb1156c797..8cc93a673cecbab957d804e50abd7a3db6d05670 100644 (file)
@@ -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 {