diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-10-09 22:24:21 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-10-09 22:24:21 +0000 |
commit | 7fe7d6d5e654d2092f89d81b0e1627fb99eb1a74 (patch) | |
tree | 42f908c838a40c252943469fdf9326228be494cb /applications/luci-openvpn/luasrc/view/openvpn | |
parent | 8815b6a7dd24a481606db03c5980bc310709a103 (diff) |
* luci/app/openvpn: controller, model and template updates
Diffstat (limited to 'applications/luci-openvpn/luasrc/view/openvpn')
-rw-r--r-- | applications/luci-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm | 11 | ||||
-rw-r--r-- | applications/luci-openvpn/luasrc/view/openvpn/pageswitch.htm | 33 |
2 files changed, 29 insertions, 15 deletions
diff --git a/applications/luci-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm b/applications/luci-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm new file mode 100644 index 0000000000..0744cf88b6 --- /dev/null +++ b/applications/luci-openvpn/luasrc/view/openvpn/cbi-select-input-add.htm @@ -0,0 +1,11 @@ +<div class="cbi-section-create"> + <% if self.invalid_cts then -%><div class="cbi-section-error"><% end %> + <input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" /> + <select class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>.select"> + <%- for k, v in luci.util.kspairs(self.add_select_options) do %> + <option value="<%=k%>"><%=luci.util.pcdata(v)%></option> + <% end -%> + </select> + <input class="cbi-button cbi-button-add" type="submit" value="<%:cbi_add%>" title="<%:cbi_add%>" /> + <% if self.invalid_cts then %><br /><%:cbi_invalid%></div><% end %> +</div> diff --git a/applications/luci-openvpn/luasrc/view/openvpn/pageswitch.htm b/applications/luci-openvpn/luasrc/view/openvpn/pageswitch.htm index 13ef35c7b7..a587666389 100644 --- a/applications/luci-openvpn/luasrc/view/openvpn/pageswitch.htm +++ b/applications/luci-openvpn/luasrc/view/openvpn/pageswitch.htm @@ -9,28 +9,31 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -$Id: value.htm 3333 2008-09-16 10:08:20Z Cyrus $ +$Id$ -%> <fieldset class="cbi-section"> <legend> <a href="<%=luci.dispatcher.build_url("admin", "services", "openvpn")%>"><%:openvpn_overview Overview%></a> » - <a href="<%=luci.dispatcher.build_url("admin", "services", "openvpn", self.instance)%>"><%=self.instance%></a> + <a href="<%=luci.dispatcher.build_url("admin", "services", "openvpn", self.mode, self.instance)%>"><%=self.instance%></a> </legend> - <ul><% for _, c in ipairs(self.categories) do %> - <li><%=c[1]%><ul><li> - <% for i, s in ipairs(c[2]) do %> - <% if s == self.csection then %> - <strong><%=translate("openvpn_%s" % s, s)%></strong> - <% else %> - <a href="<%=luci.dispatcher.build_url( - "admin", "services", "openvpn", c[1], s, self.instance - )%>"><%=translate("openvpn_%s" % s, s)%></a> - <% end %> - <% if next(c[2], i) then %>|<% end %> + <% if self.mode == "basic" then %> + <a href="<%=luci.dispatcher.build_url("admin", "services", "openvpn", "advanced", self.instance)%>"><%:openvpn_switch_advanced Switch to advanced configuration »%></a> + <% else %> + <a href="<%=luci.dispatcher.build_url("admin", "services", "openvpn", "basic", self.instance)%>"><%:openvpn_switch_basic « Switch to basic configuration%></a> + <hr style="margin:0.5em 0" /> + <%:openvpn_confcategory Configuration category%>: + <% for i, c in ipairs(self.categories) do %> + <% if c == self.category then %> + <strong><%=translate("openvpn_%s" % c, c)%></strong> + <% else %> + <a href="<%=luci.dispatcher.build_url( + "admin", "services", "openvpn", "advanced", self.instance, c + )%>"><%=translate("openvpn_%s" % c, c)%></a> <% end %> - </li></ul></li> - <% end %></ul> + <% if next(self.categories, i) then %>|<% end %> + <% end %> + <% end %> </fieldset> |