Class: Y2Network::Widgets::WirelessAuthMode
- Inherits:
-
CWM::ComboBox
- Object
- CWM::ComboBox
- Y2Network::Widgets::WirelessAuthMode
- Defined in:
- src/lib/y2network/widgets/wireless_auth_mode.rb
Instance Method Summary collapse
- #help ⇒ Object
- #init ⇒ Object
-
#initialize(settings) ⇒ WirelessAuthMode
constructor
A new instance of WirelessAuthMode.
- #items ⇒ Object
- #label ⇒ Object
- #opt ⇒ Object
- #store ⇒ Object
Constructor Details
#initialize(settings) ⇒ WirelessAuthMode
Returns a new instance of WirelessAuthMode.
26 27 28 29 30 |
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 26 def initialize(settings) textdomain "network" @settings = settings end |
Instance Method Details
#help ⇒ Object
53 54 55 56 57 58 |
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 53 def help # TODO: improve help text, mention all options and security problems with WEP "<p>WPA-EAP uses a RADIUS server to authenticate users. There\n" \ "are different methods in EAP to connect to the server and\n" \ "perform the authentication, namely TLS, TTLS, and PEAP.</p>\n" end |
#init ⇒ Object
32 33 34 |
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 32 def init self.value = @settings.auth_mode.to_s if @settings.auth_mode end |
#items ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 44 def items return @items if @items modes = Y2Network::WirelessAuthMode.all - [Y2Network::WirelessAuthMode::NONE] modes.sort_by!(&:to_human_string) modes.unshift(Y2Network::WirelessAuthMode::NONE) @items = modes.map { |m| [m.short_name, m.to_human_string] } end |
#label ⇒ Object
36 37 38 |
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 36 def label _("Mode") end |
#opt ⇒ Object
40 41 42 |
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 40 def opt [:hstretch, :notify] end |
#store ⇒ Object
60 61 62 |
# File 'src/lib/y2network/widgets/wireless_auth_mode.rb', line 60 def store @settings.auth_mode = value.to_sym end |