#15 add remove filter button

Sun, 08 Jan 2023 17:57:05 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 08 Jan 2023 17:57:05 +0100
changeset 270
8c088c628a20
parent 269
8646c229bd32
child 271
f8f5e82944fa

#15 add remove filter button

src/main/webapp/WEB-INF/jspf/issue-filter.jspf file | annotate | diff | comparison | revisions
--- a/src/main/webapp/WEB-INF/jspf/issue-filter.jspf	Sun Jan 08 17:13:57 2023 +0100
+++ b/src/main/webapp/WEB-INF/jspf/issue-filter.jspf	Sun Jan 08 17:57:05 2023 +0100
@@ -1,7 +1,7 @@
 <%--
 
 --%>
-<form method="GET">
+<form method="GET" id="filter-form">
     <div>
         <label>
             <input name="filter"
@@ -56,5 +56,6 @@
     </div>
     <div class="medskip">
         <button name="filter" type="submit"><fmt:message key="button.apply"/></button>
+        <a class="button" onclick="document.querySelectorAll('#filter-form *[name=filter]').forEach((elem) => elem.value = ''); document.getElementById('filter-form').submit()"><fmt:message key="button.remove"/></a>
     </div>
 </form>

mercurial