modules/admin-full: only display protocol related options if required software is installed, add posibility to remove 3g service field
This commit is contained in:
parent
0b34ab07d4
commit
f7dbdc6568
1 changed files with 98 additions and 91 deletions
|
@ -145,11 +145,14 @@ srv = s:option(Value, "server", translate("network_interface_server"))
|
|||
srv:depends("proto", "pptp")
|
||||
srv.rmempty = true
|
||||
|
||||
if has_3g then
|
||||
service = s:option(ListValue, "service", translate("network_interface_service"))
|
||||
service:value("", translate("cbi_select"))
|
||||
service:value("umts", "UMTS/GPRS")
|
||||
service:value("cdma", "CDMA")
|
||||
service:value("evdo", "EV-DO")
|
||||
service:depends("proto", "3g")
|
||||
service.rmempty = true
|
||||
|
||||
apn = s:option(Value, "apn", translate("network_interface_apn"))
|
||||
apn:depends("proto", "3g")
|
||||
|
@ -159,7 +162,9 @@ pincode = s:option(Value, "pincode",
|
|||
translate("network_interface_pincode_desc")
|
||||
)
|
||||
pincode:depends("proto", "3g")
|
||||
end
|
||||
|
||||
if has_pppd or has_pppoe or has_3g or has_pptp then
|
||||
user = s:option(Value, "username", translate("username"))
|
||||
user.rmempty = true
|
||||
user:depends("proto", "pptp")
|
||||
|
@ -194,7 +199,9 @@ demand:depends("proto", "pptp")
|
|||
demand:depends("proto", "pppoe")
|
||||
demand:depends("proto", "ppp")
|
||||
demand:depends("proto", "3g")
|
||||
end
|
||||
|
||||
if has_pppd or has_3g then
|
||||
device = s:option(Value, "device",
|
||||
translate("network_interface_device"),
|
||||
translate("network_interface_device_desc")
|
||||
|
@ -249,7 +256,7 @@ maxwait = s:option(Value, "maxwait",
|
|||
)
|
||||
maxwait.optional = true
|
||||
maxwait:depends("proto", "3g")
|
||||
|
||||
end
|
||||
|
||||
s2 = m:section(TypedSection, "alias", translate("aliases"))
|
||||
s2.addremove = true
|
||||
|
|
Loading…
Reference in a new issue