From 9c7eb1decd82344e22a10e6f5ac36b463d2149f5 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 1 Apr 2019 16:09:41 +0200 Subject: luci-base: switch from server side to client side widget markup Do not render standard widgets like checkboxes, select boxes, text input fields etc. on the server side anymore but utilize the ui.js primitives instead. This avoids logic duplication between server side cbi templates and JS widgets in the future. Signed-off-by: Jo-Philipp Wich --- modules/luci-base/luasrc/view/cbi/mvalue.htm | 55 +++++++--------------------- 1 file changed, 14 insertions(+), 41 deletions(-) (limited to 'modules/luci-base/luasrc/view/cbi/mvalue.htm') diff --git a/modules/luci-base/luasrc/view/cbi/mvalue.htm b/modules/luci-base/luasrc/view/cbi/mvalue.htm index db17450d27..4974a4ed28 100644 --- a/modules/luci-base/luasrc/view/cbi/mvalue.htm +++ b/modules/luci-base/luasrc/view/cbi/mvalue.htm @@ -1,43 +1,16 @@ -<% - local i, key - local v = self:valuelist(section) or {} --%> - <%+cbi/valueheader%> -<% if self.widget == "select" then %> - -<% elseif self.widget == "checkbox" then %> -
- <% for i, key in pairs(self.keylist) do %> - > - /> - > - <%=pcdata(self.vallist[i])%> - - <% if self.size and (i % self.size) == 0 then write('
') end %> - <% end %> -
-<% end %> +> <%+cbi/valuefooter%> -- cgit v1.2.3