luci-app-firewall: rely on auto-serialization for combobox choices
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 10 Feb 2016 18:38:33 +0000 (19:38 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 10 Feb 2016 18:38:44 +0000 (19:38 +0100)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
applications/luci-app-firewall/luasrc/view/firewall/cbi_addforward.htm
applications/luci-app-firewall/luasrc/view/firewall/cbi_addsnat.htm

index 4a5bcfd..b3079f3 100644 (file)
@@ -61,7 +61,7 @@
                        </td>
                        <td class="cbi-section-table-cell" style="width:110px">
                                <input type="text" class="cbi-input-text" id="_newfwd.intaddr" name="_newfwd.intaddr" data-type="host" data-optional="true"<%=
                        </td>
                        <td class="cbi-section-table-cell" style="width:110px">
                                <input type="text" class="cbi-input-text" id="_newfwd.intaddr" name="_newfwd.intaddr" data-type="host" data-optional="true"<%=
-                                       ifattr(#keys > 0, "data-choices", luci.util.serialize_json({keys, vals}))
+                                       ifattr(#keys > 0, "data-choices", {keys, vals})
                                %>/>
                        </td>
                        <td class="cbi-section-table-cell" style="width:110px">
                                %>/>
                        </td>
                        <td class="cbi-section-table-cell" style="width:110px">
index 817c046..ce27511 100644 (file)
@@ -48,7 +48,7 @@
                                </td>
                                <td class="cbi-section-table-cell" style="width:110px">
                                        <input type="text" class="cbi-input-text" id="_newsnat.dip" name="_newsnat.dip" placeholder="<%:Do not rewrite%>" data-type="ip4addr" data-optional="true"<%=
                                </td>
                                <td class="cbi-section-table-cell" style="width:110px">
                                        <input type="text" class="cbi-input-text" id="_newsnat.dip" name="_newsnat.dip" placeholder="<%:Do not rewrite%>" data-type="ip4addr" data-optional="true"<%=
-                                               ifattr(#keys > 0, "data-choices", luci.util.serialize_json({ keys, vals }))
+                                               ifattr(#keys > 0, "data-choices", { keys, vals })
                                        %> />
                                </td>
                                <td class="cbi-section-table-cell" style="width:110px">
                                        %> />
                                </td>
                                <td class="cbi-section-table-cell" style="width:110px">