68c8cc91694a5525711b1bf23aaa1f02e0c7b824
[project/luci.git] / libs / cbi / luasrc / view / cbi / simpleform.htm
1 <%#
2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 -%>
15
16 <form method="post" action="<%=luci.http.getenv("REQUEST_URI")%>">
17         <div>
18                 <script type="text/javascript" src="<%=resource%>/cbi.js"></script>
19                 <input type="hidden" name="cbi.submit" value="1" />
20         </div>
21         <div class="cbi-map" id="cbi-<%=self.config%>">
22                 <h1><%=self.title%></h1>
23                 <div class="cbi-map-descr"><%=self.description%></div>
24                 <fieldset class="cbi-section">
25                         <div class="cbi-section-node">
26                                 <% self:render_children(1, scope or {}) %>
27                         </div>
28                         <br />
29                 </fieldset>
30                 <br />
31         </div>
32         <div>
33 <%- if self.submit ~= false then %>
34                 <input class="cbi-button-save" type="submit" value="
35         <%- if not self.submit then -%><%-:submit-%><%-else-%><%=self.submit%><%end%>
36         " />
37 <% end %>
38 <%- if self.reset ~= false then %>
39                 <input class="cbi-button-reset" type="reset" value="
40         <%- if not self.reset then -%><%-:reset-%><%-else-%><%=self.reset%><%end%>
41         " />
42 <% end %>
43                 <script type="text/javascript">cbi_d_init();</script>
44         </div>
45 </form>