X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fluasrc%2Fview%2Fcbi%2Fucisection.htm;h=2cb1e75d0ee27055a8183339648e0d8f71aa9dd2;hp=ba0cc53e87be9f08585b8cb3c169036a70ada5c9;hb=6d126649f01ac817149d4f36324c161bb1a4650b;hpb=4990ec831c7190946106d5073c02ad85616c04b8;ds=inline diff --git a/modules/luci-base/luasrc/view/cbi/ucisection.htm b/modules/luci-base/luasrc/view/cbi/ucisection.htm index ba0cc53e8..2cb1e75d0 100644 --- a/modules/luci-base/luasrc/view/cbi/ucisection.htm +++ b/modules/luci-base/luasrc/view/cbi/ucisection.htm @@ -32,30 +32,25 @@ <% if self.optionals[section] and #self.optionals[section] > 0 or self.dynamic then %>
- <% if self.dynamic then %> - - <% if self.optionals[section] and #self.optionals[section] > 0 then %> - - <% end %> + <% + if self.dynamic then + local keys, vals, name, opt = { }, { } + for name, opt in pairs(self.optionals[section]) do + keys[#keys+1] = name + vals[#vals+1] = opt.title + end + %> + 0, "data-choices", luci.util.json_encode({keys, vals})) + %> /> <% else %> - - <% end %> + + <% end %>
<% end %>