]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Presenter/Tag.pm
L.radio_button_tag: id erhalten wenn sie schon vorher gesetzt ist.
[mfinanz.git] / SL / Presenter / Tag.pm
index bd489066b5f25d3572d7ccb2dfcad8a0f79c40ab..552df34aac503808d6609cf4327e2985c71043f3 100644 (file)
@@ -190,9 +190,12 @@ sub select_tag {
 }
 
 sub _set_id_attribute {
-  my ($attributes, $name) = @_;
+  my ($attributes, $name, $unique) = @_;
 
-  $attributes->{id} = name_to_id(undef, $name) if !delete($attributes->{no_id}) && !$attributes->{id};
+  if (!delete($attributes->{no_id}) && !$attributes->{id}) {
+    $attributes->{id}  = name_to_id(undef, $name);
+    $attributes->{id} .= '_' . $attributes->{value} if $unique;
+  }
 
   return %{ $attributes };
 }