summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dhcp-controller.lua6
-rw-r--r--dhcp-editnet-html.lsp8
2 files changed, 7 insertions, 7 deletions
diff --git a/dhcp-controller.lua b/dhcp-controller.lua
index 4135364..9857fa4 100644
--- a/dhcp-controller.lua
+++ b/dhcp-controller.lua
@@ -53,8 +53,8 @@ editnet = function ( self )
end
end
- if self.clientdata.cmd == "Update" then
- tmp = self.cientdata
+ if self.clientdata.cmd == "update" then
+ tmp = self.clientdata
net = self.model.create_new_net( tmp.name, tmp.defleasetime, tmp.maxleasetime, tmp.gateway,
tmp.domainname, tmp.dnssrv1, tmp.dnssrv2, tmp.subnet, tmp.netmask, tmp.leaserangestart,
tmp.leaserangeend, tmp.wpad )
@@ -63,7 +63,7 @@ editnet = function ( self )
end
net = self.model.subnet_read( self.clientdata.network );
- return ( cfe({ option = option, value = net, error = { value=nil, fields=nil }}) )
+ return ( cfe({ option = option, value = net, errcode = { msg="", fields={} }}) )
end
createnet = function ( self )
diff --git a/dhcp-editnet-html.lsp b/dhcp-editnet-html.lsp
index e58bcd9..31397d9 100644
--- a/dhcp-editnet-html.lsp
+++ b/dhcp-editnet-html.lsp
@@ -2,14 +2,14 @@
local form = ...
local option = form.option;
local net = form.value
- local erroce = form.errcode
+ local errcode = form.errcode
?>
<h1>Basic Configuration</h1>
<h2>Subnet: <? io.write(net.name.value) ?></h2>
<?
if #errcode.msg > 0 then
- io.write("<textarea style=\"width:600px\">" .. errcode.msg .. "</textarea><br>")
+ io.write("<pre style=\"color: #ff2020\">" .. errcode.msg .. "</pre><br>")
end
?>
@@ -40,5 +40,5 @@
</td></tr>
<tr><td><nobr>Lease Range Start:</nobr></td><td><input type="text" name="leaserangestart" value="<? io.write(net.leaserangestart.value) ?>"></td></tr>
<tr><td><nobr>Lease Range End:</nobr></td><td><input type="text" name="leaserangeend" value="<? io.write(net.leaserangeend.value) ?>"></td></tr>
- <tr><td></td><td><input type=submit name=cmd value="Update" style="width:300px"></form><form action="<? io.write(option.script .. option.prefix .. option.controller .. "/home") ?> method="POST">
-<input type=submit name="cmd" value="Back" style="width:300px"></form></td></tr></table>
+ <tr><td></td><td><input type=submit name=cmd value="update" style="width:100px"></form><form action="<? io.write(option.script .. option.prefix .. option.controller .. "/home") ?> method="POST">
+<input type=submit name="cmd" value="back" style="width:100px"></form></td></tr></table>