# HG changeset patch # User Pierre-Yves David # Date 1318341704 -7200 # Node ID e107204d3b27619b9f46f84089a2bca31df622d6 # Parent 80c6e2155c3d3737bb42ddc9f10d16677535ee72 Add a hidden input:submit field in facets form (closes #1988784) is supposed to submit the form only if there is a single input:text field. However most browsers will submit the form on anyway if there is an input:submit field. see: http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2 Firefox 7.0.1 does not submit form on if there is more than a input:text field and not input:submit but does it if there is an input:submit. IE 6 or Firefox 2 behave the same way. diff -r 80c6e2155c3d -r e107204d3b27 web/views/facets.py --- a/web/views/facets.py Tue Oct 11 18:18:14 2011 +0200 +++ b/web/views/facets.py Tue Oct 11 16:01:44 2011 +0200 @@ -133,6 +133,20 @@ hiddens['mainvar'] = mainvar filter_hiddens(w, baserql, wdgs, **hiddens) self.layout_widgets(w, self.sorted_widgets(wdgs)) + + # is supposed to submit the form only if there is a single + # input:text field. However most browsers will submit the form + # on anyway if there is an input:submit field. + # + # see: http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2 + # + # Firefox 7.0.1 does not submit form on if there is more than a + # input:text field and not input:submit but does it if there is an + # input:submit. + # + # IE 6 or Firefox 2 behave the same way. + w(u'') + # w(u'\n') w(u'\n')