summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-05-20 14:16:39 +0000
committerMika Havela <mika.havela@gmail.com>2008-05-20 14:16:39 +0000
commitb99d78fdfcda5ebdc8a19876c910cc44f62c7a81 (patch)
treeeebd775986c6c4ad8695dbd977777f763effde15
parentf3f381d66440d5d0eee0c0c9032d0ede0cedf3d1 (diff)
downloadacf-core-b99d78fdfcda5ebdc8a19876c910cc44f62c7a81.tar.bz2
acf-core-b99d78fdfcda5ebdc8a19876c910cc44f62c7a81.tar.xz
Added class=error to the DD part in the viewfunction.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1126 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--lib/viewfunctions.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/viewfunctions.lua b/lib/viewfunctions.lua
index 801e7e4..819135e 100644
--- a/lib/viewfunctions.lua
+++ b/lib/viewfunctions.lua
@@ -9,7 +9,12 @@ function displayinfo(myform,tags,viewtype)
io.write(" class='error'")
end
io.write(">" .. val.label .. "</DT>")
- io.write("\n\t\t<DD>")
+ io.write("\n\t\t<DD")
+ if (val.errtxt) then
+ val.class = "error"
+ io.write(" class='error'")
+ end
+ io.write(">")
if (viewtype == "viewonly") then
if (val.value == "") and (val.errtxt == nil) and ((val.descr) and (val.descr == "")) then val.value = "&nbsp;" end
io.write(val.value)