summaryrefslogtreecommitdiffhomepage
path: root/libs/web/luasrc/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-10-31 21:41:57 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-10-31 21:41:57 +0000
commitea81c6ad5371f52ef6581c82d13f14a702eb1b0a (patch)
tree54e54b358398d51d431c23c6b00dbcb91ef902b0 /libs/web/luasrc/view
parent0a7bfa4f780a91d78bbe66bb8802a8857c957871 (diff)
libs/web: use the value of the .enabled property in flag widget html
Diffstat (limited to 'libs/web/luasrc/view')
-rw-r--r--libs/web/luasrc/view/cbi/fvalue.htm7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/web/luasrc/view/cbi/fvalue.htm b/libs/web/luasrc/view/cbi/fvalue.htm
index 35ebac6e1c..013c54e684 100644
--- a/libs/web/luasrc/view/cbi/fvalue.htm
+++ b/libs/web/luasrc/view/cbi/fvalue.htm
@@ -1,7 +1,7 @@
<%#
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
+Copyright 2008-2010 Jo-Philipp Wich <xm@subsignal.org>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -13,5 +13,8 @@ $Id$
-%>
<%+cbi/valueheader%>
- <input class="cbi-input-checkbox" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="checkbox"<%= attr("id", cbid) .. attr("name", cbid) .. ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked") %> value="1" />
+ <input class="cbi-input-checkbox" onclick="cbi_d_update(this.id)" onchange="cbi_d_update(this.id)" type="checkbox"<%=
+ attr("id", cbid) .. attr("name", cbid) .. attr("value", self.enabled or 1) ..
+ ifattr((self:cfgvalue(section) or self.default) == self.enabled, "checked", "checked")
+ %> />
<%+cbi/valuefooter%>