Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
rearrange error messages in search form so errors do not break design…
Browse files Browse the repository at this point in the history
… (bug 578293)
  • Loading branch information
Fred Wenzel committed Jul 19, 2010
1 parent fb5ccec commit f08628c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
13 changes: 9 additions & 4 deletions apps/search/templates/search/search_form.html
@@ -1,8 +1,8 @@
{% macro fieldbox(name): %}
{% macro fieldbox(name, show_errors=True): %}
{% with field = search_form[name] %}
<div class="fieldWrapper wrap_{{ field.name }}">
{{ field.errors|safe }}
{{ field.label_tag()|safe }} {{ field|safe }}
{% if show_errors %}{{ field.errors|safe }}{% endif %}
</div>
{% endwith %}
{% endmacro %}
Expand All @@ -12,12 +12,17 @@
<div id="search_basic" class="clearfix">
{{ fieldbox('q') }}

{{ fieldbox('product') }}
{{ fieldbox('version') }}
{{ fieldbox('product', show_errors=False) }}
{{ fieldbox('version', show_errors=False) }}

<button type="submit">{{ _('Search') }}</button>
</div>

<div>
{{ search_form.product.errors|safe }}
{{ search_form.version.errors|safe }}
</div>

<div id="show_search_adv" class="active">
<a href="#">{{ _('Advanced') }}</a>
</div>
Expand Down
4 changes: 4 additions & 0 deletions media/css/reporter.css
Expand Up @@ -878,6 +878,10 @@ input.placeholder {
right: 0;
top: 0;
}
#search #search_form #show_search_adv {
padding: 0 0 15%;
}

#search_form #show_search_adv.active {
background-color: #fff;
}
Expand Down

0 comments on commit f08628c

Please sign in to comment.