From bb2587b1eaecba4d242b74c14af0818cab456756 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 29 Jun 2010 15:13:21 -0700 Subject: [PATCH] Add a new template variable to the Thingy search screen, so that List type form fields can display a better form for searching. Fixes bug #11612. --- docs/changelog/7.x.x.txt | 1 + .../templates_thingy-default-search-thing.wgpkg | Bin 0 -> 3236 bytes lib/WebGUI/Asset/Wobject/Thingy.pm | 5 +++-- lib/WebGUI/Help/Asset_Thingy.pm | 1 + lib/WebGUI/i18n/English/Asset_Thingy.pm | 8 +++++++- 5 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 docs/upgrades/packages-7.9.8/templates_thingy-default-search-thing.wgpkg diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 1726a4b2d..f3c9c0620 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -13,6 +13,7 @@ - fixed #11671: Approving version tags takes up 1 to hour to take affect. - fixed #11663: More detail section of image gallery - fixed #11681: Gallery album chokes on photo w/ missing properties + - fixed #11612: Thingy: Search on "list" type fields does not work properly 7.9.7 - added #11571: Allow return from photo edit view to gallery edit view diff --git a/docs/upgrades/packages-7.9.8/templates_thingy-default-search-thing.wgpkg b/docs/upgrades/packages-7.9.8/templates_thingy-default-search-thing.wgpkg new file mode 100644 index 0000000000000000000000000000000000000000..6076e8b0ad13f02bca52eb00b33d5a8e17fc1349 GIT binary patch literal 3236 zcmV;V3|sRbiwFP!00000|Lt1qQ`<-q=kxv*T3^)$vcV5x;sC~V1d`r7^fG@H#%XM1g}*=%*T zoA__D)o!n?1@5Q0)@rp|TkR*EPP?-fv|7!_t+fEQ-2cy1em~)Q`_z6VT>*2;11euoiqjWe$jO!zjKaT}|d^S6dfQa~o}E%4e~tM^b@*W_$Sj za4h2}6A2?4;-lATB-GwTnyt(I=AP_&9)7tVi)56K_vEj?ZhVm!>s2)G<%fD6j$VhC zVjmDVIIA($>z)_VrO9Oqg)yDx`}E;t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d_HEHUI#g%VT%| literal 0 HcmV?d00001 diff --git a/lib/WebGUI/Asset/Wobject/Thingy.pm b/lib/WebGUI/Asset/Wobject/Thingy.pm index d904e2591..be8351205 100644 --- a/lib/WebGUI/Asset/Wobject/Thingy.pm +++ b/lib/WebGUI/Asset/Wobject/Thingy.pm @@ -3284,7 +3284,7 @@ $self->session->form->process($_) eq "") { sequenceNumber'); while (my $field = $fields->hashRef) { if ($field->{searchIn}){ - my $searchForm = $self->getFormElement($field); + my $searchForm = $self->getFormPlugin($field, 1); my $searchTextForm = WebGUI::Form::Text($self->session, { name=>"field_".$field->{fieldId}, size=>25, @@ -3299,9 +3299,10 @@ sequenceNumber'); push(@searchFields_loop, { "searchFields_fieldId" => $field->{fieldId}, "searchFields_label" => $field->{label}, - "searchFields_form" => $searchForm, + "searchFields_form" => $searchForm->toHtml, "searchFields_textForm" => $searchTextForm, "searchFields_is".$fieldType => 1, + "searchFields_listType" => $searchForm->isa('WebGUI::Form::List'), }); my @searchValue = $session->form->process("field_".$field->{fieldId}); diff --git a/lib/WebGUI/Help/Asset_Thingy.pm b/lib/WebGUI/Help/Asset_Thingy.pm index 1ffdb1556..7bdd1be1b 100644 --- a/lib/WebGUI/Help/Asset_Thingy.pm +++ b/lib/WebGUI/Help/Asset_Thingy.pm @@ -191,6 +191,7 @@ our $HELP = { { 'name' => 'searchFields_textForm' }, { 'name' => 'searchFields_label' }, { 'name' => 'searchFields_is__fieldType__' }, + { 'name' => 'searchFields_listType' }, ], }, { 'name' => 'listOfThings', diff --git a/lib/WebGUI/i18n/English/Asset_Thingy.pm b/lib/WebGUI/i18n/English/Asset_Thingy.pm index a52ae84f6..ddf210594 100644 --- a/lib/WebGUI/i18n/English/Asset_Thingy.pm +++ b/lib/WebGUI/i18n/English/Asset_Thingy.pm @@ -970,11 +970,17 @@ search has been done.|, }, 'searchFields_is__fieldType__' => { - message => q|A boolean indicating wether this field is of type __fieldType__. The first letter of __fieldType__ is always uppercase. Example: for a select box the value of <tmpl_var searchFields_isSelectBox> is true.|, + message => q|A boolean indicating whether this field is of type __fieldType__. The first letter of __fieldType__ is always uppercase. Example: for a select box the value of <tmpl_var searchFields_isSelectBox> is true.|, lastUpdated => 1104630516, context => q|Description of a tmpl_var for the template help.|, }, + 'searchFields_listType' => { + message => q|A boolean indicating whether this field is a List type field.|, + lastUpdated => 1277849256, + context => q|Description of a tmpl_var for the template help.|, + }, + 'displayInSearchFields_loop' => { message => q|A loop containing the fields that are displayed in the search results.|, lastUpdated => 1104630516,