Commit dd4f8963 by Rocky Duan

hide empty brackets when not filtering through tags

parent 62bc1aae
......@@ -9,10 +9,16 @@ def base_url_for_search():
%>
<form action="${base_url_for_search()}" method="get" class="discussion-search-form">
<%
if tags:
displayed_value = "[" + tags + "]" + text
else:
displayed_value = text
%>
% if 'tag' in query_params:
<input class="search-input" type="text" value="[${tags}]${text}" id="keywords" autocomplete="off"/>
<input class="search-input" type="text" value="${displayed_value}" id="keywords" autocomplete="off"/>
% else:
<input class="search-input" type="text" value="[${tags}]${text}" id="keywords" autocomplete="off"/>
<input class="search-input" type="text" value="${displayed_value}" id="keywords" autocomplete="off"/>
% endif
<div class="discussion-link discussion-search-link" href="javascript:void(0)">Search posts</div>
</form>
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