summaryrefslogtreecommitdiffhomepage
path: root/applications
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-08-09 10:16:03 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-08-09 10:16:03 +0000
commit6c66d913367af8e468244762b83e274f5ea93e92 (patch)
tree0e9520fcdaeb802b7babdc1de61df594b353e2eb /applications
parenta2e93572a9ce37a56e5e4ee138215cfa9391f22d (diff)
applications/luci-firewall: javascript & validation fixes in quickaction forms
Diffstat (limited to 'applications')
-rw-r--r--applications/luci-firewall/luasrc/view/firewall/cbi_addrule.htm2
-rw-r--r--applications/luci-firewall/luasrc/view/firewall/cbi_addsnat.htm3
2 files changed, 3 insertions, 2 deletions
diff --git a/applications/luci-firewall/luasrc/view/firewall/cbi_addrule.htm b/applications/luci-firewall/luasrc/view/firewall/cbi_addrule.htm
index 473f9f451..463b2e05f 100644
--- a/applications/luci-firewall/luasrc/view/firewall/cbi_addrule.htm
+++ b/applications/luci-firewall/luasrc/view/firewall/cbi_addrule.htm
@@ -73,7 +73,7 @@
</table>
<script type="text/javascript">//<![CDATA[
- cbi_validate_field('_newopen.extport', true, 'list(portrange)');
+ cbi_validate_field('_newopen.extport', true, 'list(neg(portrange))');
cbi_bind(document.getElementById('_newopen.extport'), 'blur',
function() {
var n = document.getElementById('_newopen.name');
diff --git a/applications/luci-firewall/luasrc/view/firewall/cbi_addsnat.htm b/applications/luci-firewall/luasrc/view/firewall/cbi_addsnat.htm
index 28bb22d40..4e1681c11 100644
--- a/applications/luci-firewall/luasrc/view/firewall/cbi_addsnat.htm
+++ b/applications/luci-firewall/luasrc/view/firewall/cbi_addsnat.htm
@@ -52,10 +52,11 @@
<script type="text/javascript">//<![CDATA[
cbi_validate_field('_newsnat.dport', true, 'portrange');
+ cbi_validate_field('_newsnat.dip', true, 'ip4addr');
cbi_combobox_init('_newsnat.dip', {
<% local c, k, v = 0; for k, v in ipairs(nw:get_interfaces()) do -%>
<%- local a; for k, a in ipairs(v:ipaddrs()) do c = c + 1 -%>
- <% if c > 1 then %>,<% end %>'<%=a:host():string()%>': '<%=a:host():string()%> (<%=v:shortname()%>)',
+ <% if c > 1 then %>,<% end %>'<%=a:host():string()%>': '<%=a:host():string()%> (<%=v:shortname()%>)'
<%- end %>
<%- end %> }, '<%: -- Please choose -- %>', '<%: -- custom -- %>');
//]]></script>