Changeset 6814

Show
Ignore:
Timestamp:
01/29/11 04:56:16 (2 years ago)
Author:
jow
Message:

applications/luci-radvd: fix some variable clashes in overview model

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/applications/luci-radvd/luasrc/model/cbi/radvd.lua

    r6808 r6814  
    264264s4.anonymous = true 
    265265 
    266 function s.create(...) 
     266function s4.create(...) 
    267267    local id = TypedSection.create(...) 
    268268    luci.http.redirect(s4.extedit % id) 
     
    332332-- 
    333333 
    334 s4 = m:section(TypedSection, "dnssl", translate("DNSSL")) 
    335 s4.template = "cbi/tblsection" 
    336 s4.extedit  = luci.dispatcher.build_url("admin/network/radvd/dnssl/%s") 
    337 s4.addremove = true 
    338 s4.anonymous = true 
    339  
    340 function s.create(...) 
    341     local id = TypedSection.create(...) 
    342     luci.http.redirect(s4.extedit % id) 
    343 end 
    344  
    345  
    346 o = s4:option(Flag, "ignore", translate("Enable")) 
    347 o.rmempty = false 
    348 o.width   = "30px" 
    349 function o.cfgvalue(...) 
    350     local v = Flag.cfgvalue(...) 
    351     return v == "1" and "0" or "1" 
    352 end 
    353 function o.write(self, section, value) 
    354     Flag.write(self, section, value == "1" and "0" or "1") 
    355 end 
    356  
    357 o = s4:option(DummyValue, "interface", translate("Interface")) 
    358 o.template = "cbi/network_netinfo" 
    359 o.width    = "10%" 
    360  
    361 o = s4:option(DummyValue, "suffix", translate("Suffix")) 
     334s5 = m:section(TypedSection, "dnssl", translate("DNSSL")) 
     335s5.template = "cbi/tblsection" 
     336s5.extedit  = luci.dispatcher.build_url("admin/network/radvd/dnssl/%s") 
     337s5.addremove = true 
     338s5.anonymous = true 
     339 
     340function s5.create(...) 
     341    local id = TypedSection.create(...) 
     342    luci.http.redirect(s5.extedit % id) 
     343end 
     344 
     345 
     346o = s5:option(Flag, "ignore", translate("Enable")) 
     347o.rmempty = false 
     348o.width   = "30px" 
     349function o.cfgvalue(...) 
     350    local v = Flag.cfgvalue(...) 
     351    return v == "1" and "0" or "1" 
     352end 
     353function o.write(self, section, value) 
     354    Flag.write(self, section, value == "1" and "0" or "1") 
     355end 
     356 
     357o = s5:option(DummyValue, "interface", translate("Interface")) 
     358o.template = "cbi/network_netinfo" 
     359o.width    = "10%" 
     360 
     361o = s5:option(DummyValue, "suffix", translate("Suffix")) 
    362362o.width = "60%" 
    363363function o.cfgvalue(self, section) 
     
    376376end 
    377377 
    378 o = s4:option(DummyValue, "AdvDNSSLLifetime", translate("Lifetime")) 
     378o = s5:option(DummyValue, "AdvDNSSLLifetime", translate("Lifetime")) 
    379379function o.cfgvalue(self, section) 
    380380    local v = Value.cfgvalue(self, section) or "1200"