Signed-off-by: Jo-Philipp Wich <jo@mein.io>
var filter = document.querySelector('input[name="filter"]'),
keyTimeout = null;
- filter.value = '';
+ filter.value = filter.getAttribute('value');
filter.addEventListener('keyup',
function(ev) {
if (keyTimeout !== null)
<div>
<label><%:Filter%>:</label>
- <input type="text" name="filter" placeholder="<%:Type to filter…%>" /><!--
+ <input type="text" name="filter" placeholder="<%:Type to filter…%>"<%=attr("value", luci.http.formvalue("query") or "")%> /><!--
--><button class="btn cbi-button" onclick="handleReset(event)"><%:Clear%></button>
</div>