Commit 7cc1d8a4 authored by Ivan Tyagov's avatar Ivan Tyagov

If no search criteria has been specified , refuse to conduct any search and show a message to user.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33165 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3899d909
......@@ -75,6 +75,12 @@ if web_section is not None and \\\n
else:\n
search_context = context.getPortalObject()\n
\n
if field_your_search_text in (\'\', None):\n
# no search criteria specified, refuse to conduct any search and \n
# show a message to user\n
kw[\'portal_status_message\'] = \'Please specify search criteria.\'\n
return search_context.Base_redirect(\'view\', keep_items=kw)\n
\n
return search_context.Base_redirect(field_your_search_form_id, keep_items=kw)\n
</string> </value>
</item>
......@@ -126,6 +132,7 @@ return search_context.Base_redirect(field_your_search_form_id, keep_items=kw)\n
<string>bool</string>
<string>False</string>
<string>search_context</string>
<string>_write_</string>
</tuple>
</value>
</item>
......
1488
\ No newline at end of file
1490
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment