-attachnet = m:field(Flag, "_attach", translate("Attach to existing network"),
- translate("If the interface is attached to an existing network it will be <em>bridged</em> " ..
- "to the existing interfaces and is covered by the firewall zone of the choosen network. " ..
- "Uncheck this option to define a new standalone network."
- ))
-
-attachnet.rmempty = false
-attachnet.default = http.formvalue("cbi.submit") and nil or "1"
-
-function attachnet.formvalue(self, section)
- if not http.formvalue("cbi.submit") then
- return m.hidden.mode == "Ad-Hoc" and "0" or "1"
- else
- return Value.formvalue(self, section) and "1" or "0"
- end
-end
-
-attachnet.cfgvalue = attachnet.formvalue
-