Skip to content

Commit

Permalink
Preserve query in vulnerability search and reduce redundant whitespace
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
  • Loading branch information
sbs2001 committed Feb 11, 2021
1 parent c12eaea commit 7141ae6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions vulnerabilities/templates/vulnerabilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ <h1 class="title">
<form action="{% url 'vulnerability_search' %}" method="get">
{% load widget_tweaks %}
<div class="field is-horizontal">
{{form.vuln_id|add_class:"input"}}
{% with searched_for as query%}
{% render_field form.vuln_id class="input" value=query %}
{% endwith %}
<button class="button is-success", type="submit">
Search
</button>
</div>
</form>
{% if searched_for %}
<p class="has-text-centered">{{result_size}} results</p>
{% endif %}
</div>
</div>

{% if vulnerabilities %}
<section class="section is-small has-text-centered">
<div class="container">
<h1 class="title" id="results">Results of your query "{{searched_for}}"</h1>
<h3 class="subtitle" id="results">Total {{result_size}} results</h3>
</div>
</section>

<section class="section">

<div class="content is-large">
Expand Down

0 comments on commit 7141ae6

Please sign in to comment.