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 2c34028e58aae1aaafdfa19a807551f61af7c77a..115250a82d5f4f94d7c38ed5e6f9c323bff95353 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>