diff options
-rw-r--r-- | dhcp-home-html.lsp | 4 | ||||
-rw-r--r-- | dhcp-status-html.lsp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/dhcp-home-html.lsp b/dhcp-home-html.lsp index 075e1c3..849f6f2 100644 --- a/dhcp-home-html.lsp +++ b/dhcp-home-html.lsp @@ -9,7 +9,7 @@ function displayinfo(myform,tags,viewonly) if (myform[v]) and (myform[v]["value"]) then local val = myform[v] io.write("\t<DT") - if (#val.errtxt > 0) then + if (val.errtxt) then val.class = "error" io.write(" class='error'") end @@ -20,7 +20,7 @@ function displayinfo(myform,tags,viewonly) io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n") end if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + if (val.errtxt) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end io.write("\t\t</DD>\n") end end diff --git a/dhcp-status-html.lsp b/dhcp-status-html.lsp index 183b2bb..d68a5fe 100644 --- a/dhcp-status-html.lsp +++ b/dhcp-status-html.lsp @@ -6,7 +6,7 @@ function displayinfo(myform,tags,viewonly) if (myform[v]) and (myform[v]["value"]) then local val = myform[v] io.write("\t<DT") - if (#val.errtxt > 0) then + if (val.errtxt) then val.class = "error" io.write(" class='error'") end @@ -17,7 +17,7 @@ function displayinfo(myform,tags,viewonly) io.write("\t\t<DD>" .. html.form[val.type](val) .. "\n") end if (val.descr) and (#val.descr > 0) then io.write("\t\t<P CLASS='descr'>" .. string.gsub(val.descr, "\n", "<BR>") .. "</P>\n") end - if (#val.errtxt > 0) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end + if (val.errtxt) then io.write("\t\t<P CLASS='error'>" .. string.gsub(val.errtxt, "\n", "<BR>") .. "</P>\n") end io.write("\t\t</DD>\n") end end |