Revision 8f7bb9d5
Von Bernd Bleßmann vor etwa 4 Jahren hinzugefügt
SL/Presenter/Project.pm | ||
---|---|---|
38 | 38 |
my @classes = $params{class} ? ($params{class}) : (); |
39 | 39 |
push @classes, 'project_autocomplete'; |
40 | 40 |
|
41 |
|
|
42 |
my %data_params = map { $_ => delete $params{$_} } grep { defined $params{$_} } qw(customer_id active valid); |
|
43 |
|
|
41 | 44 |
my $ret = |
42 |
input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id) . |
|
43 |
join('', map { $params{$_} ? input_tag("", delete $params{$_}, id => "${id}_${_}", type => 'hidden') : '' } qw(customer_id)) . |
|
45 |
input_tag($name, (ref $value && $value->can('id') ? $value->id : ''), class => "@classes", type => 'hidden', id => $id, |
|
46 |
'data-project-picker-data' => JSON::to_json(\%data_params), |
|
47 |
) . |
|
44 | 48 |
input_tag("", ref $value ? $value->displayable_name : '', id => "${id}_name", %params); |
45 | 49 |
|
46 | 50 |
$::request->layout->add_javascripts('autocomplete_project.js'); |
Auch abrufbar als: Unified diff
Projekt-Picker: Parameter f. aktiv/gültig
und Filter-Daten via data an js übergeben