my $ret =
$self->input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id) .
- 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);
+ join('', map { $params{$_} ? $self->input_tag("", delete $params{$_}, id => "${id}_${_}", type => 'hidden') : '' } qw(type unit convertible_unit)) .
+ $self->input_tag("", ref $value ? $value->displayable_name : '', id => "${id}_name", %params);
$::request->layout->add_javascripts('autocomplete_part.js');
$::request->presenter->need_reinit_widgets($id);
overwritten with C<$params{id}>).
An additional dummy input will be generated which is used to find
-parts. For a detailed description of it's behaviour, see section
+parts. For a detailed description of its behaviour, see section
C<PART PICKER SPECIFICATION>.
C<$value> can be a parts id or a C<Rose::DB:Object> instance.
If C<%params> contains C<convertible_unit> only parts with a unit
that's convertible to unit will be used for autocompletion.
-Obsolete parts will by default not displayed for selection. However they are
+Obsolete parts will by default not be 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.
C<part_picker> will register it's javascript for inclusion in the next header
rendering. If you write a standard controller that only call C<render> once, it
will just work. In case the header is generated in a different render call
-(multiple blocks, ajax, old C<bin/moilla> style controllers) you need to
+(multiple blocks, ajax, old C<bin/mozilla> style controllers) you need to
include C<js/autocomplete_part.js> yourself.
=back
=item *
-Should not be constraint to exact matches
+Should not be constrained to exact matches
=back
=item 5
-An internal status of the part picker, indicating wether id input and dummy
+An internal status of the part picker, indicating whether id input and dummy
input are consistent. After leaving the dummy input the part picker must
place itself in a consistent status.