base: trigger page reload with cbi reset button
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 26 Oct 2014 17:20:17 +0000 (18:20 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 26 Oct 2014 17:20:22 +0000 (18:20 +0100)
Many complex widgets do not reset properly with traditional form reset,
therfore simply reload the page.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
modules/base/luasrc/view/cbi/footer.htm

index 2c34028..115250a 100644 (file)
@@ -16,7 +16,7 @@
                        <input class="cbi-button cbi-button-save" type="submit" value="<%:Save%>" />
                <% end %>
                <% if not flow.hideresetbtn then %>
-                       <input class="cbi-button cbi-button-reset" type="reset" value="<%:Reset%>" />
+                       <input class="cbi-button cbi-button-reset" type="button" value="<%:Reset%>" onclick="location.href='<%=REQUEST_URI%>'" />
                <% end %>
 
                <script type="text/javascript">cbi_d_update();</script>