]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Presenter/Part.pm
Doku update
[mfinanz.git] / SL / Presenter / Part.pm
index 1fbce1e068dbceab742ce4f02f96482619c14a6c..1091667bf16752e9f68ba20ee9f840b2297410b7 100644 (file)
@@ -40,6 +40,7 @@ sub part_picker {
     join('', map { $params{$_} ? $self->input_tag("", delete $params{$_}, id => "${id}_${_}", type => 'hidden') : '' } qw(column type unit convertible_unit)) .
     $self->input_tag("", (ref $value && $value->can('description')) ? $value->description : '', id => "${id}_name", %params);
 
+  $::request->layout->add_javascripts('autocomplete_part.js');
   $::request->presenter->need_reinit_widgets($id);
 
   $self->html_tag('span', $ret, class => 'part_picker');
@@ -119,8 +120,9 @@ Obsolete parts will by default not displayed for selection. However they are
 accepted as default values and can persist during updates. As with other
 selectors though, they are not selectable once overridden.
 
-Currently you must include C<js/autocomplete_part.js> in your controller, the
-presenter can not do this from the template.
+Currently you must include C<js/autocomplete_part.js> in old bin/mozilla-style
+controllers if C<<$form->header>> is called before the template. In all other
+cases, C<part_picker> will add the javascript for you.
 
 =back