+key = s:option(Value, "key", translate("key"))
+key:depends("encryption", "wep")
+key:depends("encryption", "PSK")
+key:depends({mode="ap", encryption="WPA"})
+key:depends("encryption", "PSK2")
+key:depends({mode="ap", encryption="WPA2"})
+key.rmempty = true
+
+nasid = s:option(Value, "nasid", translate("a_w_nasid"))
+nasid:depends({mode="ap", encryption="WPA"})
+nasid:depends({mode="ap", encryption="WPA2"})
+nasid.rmempty = true
+
+eaptype = s:option(ListValue, "eap_type", translate("a_w_eaptype"))
+eaptype:value("TLS")
+eaptype:value("PEAP")
+eaptype:depends({mode="sta", encryption="WPA"})
+eaptype:depends({mode="sta", encryption="WPA2"})
+
+cacert = s:option(Value, "ca_cert", translate("a_w_cacert"))
+cacert:depends({mode="sta", encryption="WPA"})
+cacert:depends({mode="sta", encryption="WPA2"})
+
+privkey = s:option(Value, "priv_key", translate("a_w_tlsprivkey"))
+privkey:depends({mode="sta", eap_type="TLS", encryption="WPA2"})
+privkey:depends({mode="sta", eap_type="TLS", encryption="WPA"})
+
+privkeypwd = s:option(Value, "priv_key_pwd", translate("a_w_tlsprivkeypwd"))
+privkeypwd:depends({mode="sta", eap_type="TLS", encryption="WPA2"})
+privkeypwd:depends({mode="sta", eap_type="TLS", encryption="WPA"})
+
+
+auth = s:option(Value, "auth", translate("a_w_peapauth"))
+auth:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
+auth:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
+
+identity = s:option(Value, "identity", translate("a_w_peapidentity"))
+identity:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
+identity:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
+
+password = s:option(Value, "password", translate("a_w_peappassword"))
+password:depends({mode="sta", eap_type="PEAP", encryption="WPA2"})
+password:depends({mode="sta", eap_type="PEAP", encryption="WPA"})
+
+
+
+