libs/web: handle .redirect property for SimpleForm widgets
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 11 Oct 2011 01:20:36 +0000 (01:20 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 11 Oct 2011 01:20:36 +0000 (01:20 +0000)
libs/web/luasrc/view/cbi/simpleform.htm

index 36537ec..1a4726a 100644 (file)
@@ -16,7 +16,7 @@
 <%- end %>
 <%- if self.errmessage then %>
        <div class="error"><%=self.errmessage%></div>
 <%- end %>
 <%- if self.errmessage then %>
        <div class="error"><%=self.errmessage%></div>
-<%- end %>     
+<%- end %>
 <% if not self.embedded then %>
        <div>
 <%-
 <% if not self.embedded then %>
        <div>
 <%-
                end
        end
 %>
                end
        end
 %>
+<% if redirect then %>
+       <div style="float:left">
+               <input class="cbi-button cbi-button-link" type="button" value="<%:Back to Overview%>" onclick="location.href='<%=pcdata(redirect)%>'" />
+       </div>
+<% end %>
 <%- if self.flow and self.flow.skip then %>
        <input class="cbi-button cbi-button-skip" type="submit" name="cbi.skip" value="<%:Skip%>" />
 <% end %>
 <%- if self.flow and self.flow.skip then %>
        <input class="cbi-button cbi-button-skip" type="submit" name="cbi.skip" value="<%:Skip%>" />
 <% end %>