luci-base: cbi: rely on auto-serialization for combobox choices
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 10 Feb 2016 18:36:37 +0000 (19:36 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 10 Feb 2016 18:36:37 +0000 (19:36 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
modules/luci-base/luasrc/view/cbi/value.htm

index e6e0287ef334d65ac0a905f420504ebeece05dfd..c8c905eb11e1043392eecec54c8f5410d4216aeb 100644 (file)
@@ -12,7 +12,7 @@
                ifattr(self.datatype, "data-type", self.datatype) ..
                ifattr(self.datatype, "data-optional", self.optional or self.rmempty) ..
                ifattr(self.combobox_manual, "data-manual", self.combobox_manual) ..
-               ifattr(#self.keylist > 0, "data-choices", luci.util.serialize_json({ self.keylist, self.vallist }))
+               ifattr(#self.keylist > 0, "data-choices", { self.keylist, self.vallist })
        %> />
        <% if self.password then %><img src="<%=resource%>/cbi/reload.gif" style="vertical-align:middle" title="<%:Reveal/hide password%>" onclick="var e = document.getElementById('<%=cbid%>'); e.type = (e.type=='password') ? 'text' : 'password';" /><% end %>
 <%+cbi/valuefooter%>