The #default_value is not correctly set on filter forms when select is used instead of autocomplete.
This is happen because in l10n_community_filter_form() the value is set
'#default_value' => isset($filters['project']) ? $filters['project']->title : '',
but when select is used the value passed should be $filters['project']->uri not $filters['project']->title.
This patch fixes this bug.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | l10n_server_project_filter1-D6.patch | 803 bytes | claudiu.cristea |
| l10n_server_project_filter-D6.patch | 1.54 KB | claudiu.cristea |
Comments
Comment #1
gábor hojtsyWe tried to use the same data handling, so the select should ideally use the title too, which would fix this problem in a different way to make it consistent.
Comment #2
gábor hojtsyComment #3
claudiu.cristeaTo me, the URI is something more consistent. I'm not sure that the project title is unique but the URI surely is.
We can:
Comment #4
gábor hojtsyThe autocomplete will only ever get us the title, so using the same data in the select would be useful.
Comment #5
claudiu.cristeaVoila! Replaced the URI with Title in option's value attribute.
Comment #6
gábor hojtsyThanks, committed this one.