Skip to content

Commit ae55496

Browse files
committed
fix(ui): preserve search and lookup values
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 20a9304 commit ae55496

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎vulnerabilities/templates/advisory_todos.html‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ <h1>Advisory To-Dos</h1>
5959
{{ form.search }}
6060

6161
{% if form.search.value %}
62-
<a href="?{% querystring request search='' avid='' %}"
62+
<a href="{{ request.path }}"
6363
class="icon is-right"
6464
style="pointer-events: auto; cursor: pointer;">
6565
<i class="fa fa-close" style="color:grey"></i>
@@ -71,7 +71,7 @@ <h1>Advisory To-Dos</h1>
7171
{{ form.avid }}
7272

7373
{% if form.avid.value %}
74-
<a href="?{% querystring request search='' avid='' %}"
74+
<a href="{{ request.path }}"
7575
class="icon is-right"
7676
style="pointer-events: auto; cursor: pointer;">
7777
<i class="fa fa-close" style="color:gray"></i>
@@ -220,10 +220,12 @@ <h1>Advisory To-Dos</h1>
220220
searchContainer.style.display = 'none';
221221
lookupContainer.style.display = '';
222222
searchContainer.querySelector('input').value = '';
223+
lookupContainer.querySelector('input').value = avid;
223224
} else {
224225
searchContainer.style.display = '';
225226
lookupContainer.style.display = 'none';
226227
lookupContainer.querySelector('input').value = '';
228+
searchContainer.querySelector('input').value = search;
227229
}
228230
}
229231

0 commit comments

Comments
 (0)