running the selenium test t/testsuite/126_test_status_whiteboard.t uncovered an error in the search form, which is the status whiteboard field is always included in the search form whether the usestatuswhiteboard param is turned on or off, when looking at the code of the template template/en/default/search/form.html.tmpl I found that the code for checking the param is missing from the template comparing it to the upstream original code. Noura
Created attachment 344427 [details] v1 for code to fix status whiteboard issue with search form added missing code that checks usestatuswhiteboard param to determine whether to add the status whiteboard field or not to the search form. Noura
Comment on attachment 344427 [details] v1 for code to fix status whiteboard issue with search form >Index: template/en/default/search/form.html.tmpl >=================================================================== >--- template/en/default/search/form.html.tmpl (revision 1267) >+++ template/en/default/search/form.html.tmpl (working copy) >@@ -271,7 +271,9 @@ > { name => "status_whiteboard", description => "Status <u>W</u>hiteboard", > accesskey => 'w' } > ] %] >- >+ >+ [% UNLESS field.name == 'status_whiteboard' AND NOT Param('usestatuswhiteboard') %] >+ Nit-pick: Perl Best Practices #66 says we should not use unless where if would work as well to help avoid confusion of those coming from other languages that do not have negative conditional tests. Maybe use instead [% IF field.name == 'status_whiteboard' AND Param('usestatuswhiteboard') %] But I leave this up to you if want to leave it as this technically works for me as well. Dave > <tr> > <th align="right"> > <label for="[% field.name %]" accesskey="[% field.accesskey %]">[% field.description %]</label>: >@@ -290,6 +292,7 @@ > </td> > <td></td> > </tr> >+ [% END %] > [% END %] > > [% IF have_keywords %]
Thanks for the review Dave,, I am going to leave it to UNLESS caze it is the original code of upstream that was deleted from our template. Noura