-elseif (tonumber(m.hidden.wpa_version) or 0) > 0 and
- (m.hidden.wpa_suites == "PSK" or m.hidden.wpa_suites == "PSK2")
-then
- wkey = m:field(Value, "key", translate("WPA passphrase"),
- translate("Specify the secret encryption key here."))
- wkey.password = true
- wkey.datatype = "wpakey"
+elseif (tonumber(m.hidden.wpa_version) or 0) > 0 then
+ if m.hidden.wpa_suites == "PSK" or m.hidden.wpa_suites == "PSK2" then
+ wkey = m:field(Value, "key", translate("WPA passphrase"),
+ translate("Specify the secret encryption key here."))
+ wkey.password = true
+ wkey.datatype = "wpakey"
+ elseif m.hidden.wpa_suites == "802.1X" then
+ eaptype = m:field(ListValue, "eap_type", translate("EAP-Method"))
+ eaptype:value("TLS")
+ eaptype:value("TTLS")
+ eaptype:value("PEAP")
+ eaptype.default = "PEAP"
+
+ authentication = m:field(ListValue, "auth", translate("Authentication"))
+ authentication:value("PAP")
+ authentication:value("CHAP")
+ authentication:value("MSCHAP")
+ authentication:value("MSCHAPV2")
+ authentication.default = "MSCHAPV2"
+
+ ident = m:field(Value, "identity", translate("Identity"))
+
+ pass = m:field(Value, "password", translate("Password"))
+ pass.datatype = "wpakey"
+ pass.password = true
+ end